Hello community,

here is the log from the commit of package python-pytest-doctestplus for 
openSUSE:Factory checked in at 2020-06-10 00:49:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-doctestplus (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-doctestplus"

Wed Jun 10 00:49:51 2020 rev:8 rq:812817 version:0.7.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-doctestplus/python-pytest-doctestplus.changes
      2020-05-19 14:47:34.871954564 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.3606/python-pytest-doctestplus.changes
    2020-06-10 00:49:52.731174574 +0200
@@ -1,0 +2,7 @@
+Tue Jun  9 08:05:00 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 0.7.0:
+  * Added a new ini option, doctest_subpackage_requires, that can
+    be used to skip specific subpackages based on required packages. [#112]
+
+-------------------------------------------------------------------

Old:
----
  pytest-doctestplus-0.6.1.tar.gz

New:
----
  pytest-doctestplus-0.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-doctestplus.spec ++++++
--- /var/tmp/diff_new_pack.BRqYEY/_old  2020-06-10 00:49:53.411176353 +0200
+++ /var/tmp/diff_new_pack.BRqYEY/_new  2020-06-10 00:49:53.415176364 +0200
@@ -27,7 +27,7 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-doctestplus%{psuffix}
-Version:        0.6.1
+Version:        0.7.0
 Release:        0
 Summary:        Pytest plugin with advanced doctest features
 License:        BSD-3-Clause

++++++ pytest-doctestplus-0.6.1.tar.gz -> pytest-doctestplus-0.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/.gitignore 
new/pytest-doctestplus-0.7.0/.gitignore
--- old/pytest-doctestplus-0.6.1/.gitignore     2019-11-02 18:35:36.000000000 
+0100
+++ new/pytest-doctestplus-0.7.0/.gitignore     1970-01-01 01:00:00.000000000 
+0100
@@ -1,60 +0,0 @@
-# Compiled files
-*.py[cod]
-*.a
-*.o
-*.so
-*.pyd
-__pycache__
-
-# Ignore .c files by default to avoid including generated code. If you want to
-# add a non-generated .c extension, use `git add -f filename.c`.
-*.c
-
-# Other generated files
-MANIFEST
-
-# Sphinx
-_build
-_generated
-docs/api
-docs/generated
-
-# Packages/installer info
-*.egg
-*.egg-info
-dist
-build
-eggs
-.eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
-distribute-*.tar.gz
-
-# Other
-.cache
-.tox
-.*.swp
-.*.swo
-*~
-.project
-.pydevproject
-.settings
-.coverage
-cover
-htmlcov
-.pytest_cache
-
-# Env
-.venv
-venv
-.env
-
-# Mac OSX
-.DS_Store
-
-# PyCharm
-.idea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/.travis.yml 
new/pytest-doctestplus-0.7.0/.travis.yml
--- old/pytest-doctestplus-0.6.1/.travis.yml    2020-04-30 08:00:07.000000000 
+0200
+++ new/pytest-doctestplus-0.7.0/.travis.yml    1970-01-01 01:00:00.000000000 
+0100
@@ -1,52 +0,0 @@
-# We set the language to c because python isn't supported on the MacOS X nodes
-# on Travis. However, the language ends up being irrelevant anyway, since we
-# install Python ourselves using conda.
-language: c
-
-os:
-    - linux
-    - windows
-
-env:
-    global:
-        # The following versions are the 'default' for tests, unless
-        # overidden underneath. They are defined here in order to save having
-        # to repeat them for all configurations.
-        - PYTHON_VERSION=3.8
-        - PYTEST_COMMAND='pytest'
-        - PY_IGNORE_IMPORTMISMATCH=1
-
-    jobs:
-        - PYTHON_VERSION=3.6
-        - PYTHON_VERSION=3.7 PYTEST_VERSION=4
-        - PYTHON_VERSION=3.8 PYTEST_VERSION='<5.4'
-
-stages:
-    # only run 2 jobs initially. Using "test" as it cannot be adjusted for the 
root jobs above.
-    - name: Initial tests
-    - name: test
-
-jobs:
-    include:
-        - os: linux
-          env: PYTHON_VERSION=3.7 NUMPY_VERSION=stable
-          stage: Initial tests
-
-        # Try a run on OSX with latest versions of python and pytest
-        - os: osx
-          stage: test
-          env: PYTHON_VERSION=3.7
-
-        # Try a run against dev pytest
-        - stage: test
-          env: PYTHON_VERSION=3.8 PYTEST_VERSION=dev
-
-install:
-    - git clone git://github.com/astropy/ci-helpers.git
-    - source ci-helpers/travis/setup_conda.sh
-    - python ./setup.py install
-
-script:
-   - $PYTEST_COMMAND --doctest-plus
-   - $PYTEST_COMMAND --doctest-plus --doctest-rst
-   - $PYTEST_COMMAND --doctest-plus --doctest-rst --text-file-format=tex
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/CHANGES.rst 
new/pytest-doctestplus-0.7.0/CHANGES.rst
--- old/pytest-doctestplus-0.6.1/CHANGES.rst    2020-05-05 03:33:10.000000000 
+0200
+++ new/pytest-doctestplus-0.7.0/CHANGES.rst    2020-05-20 16:57:53.000000000 
+0200
@@ -1,3 +1,9 @@
+0.7.0 (2020-05-20)
+==================
+
+- Added a new ini option, ``doctest_subpackage_requires``, that can be used to 
skip
+  specific subpackages based on required packages. [#112]
+
 0.6.1 (2020-05-04)
 ==================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/PKG-INFO 
new/pytest-doctestplus-0.7.0/PKG-INFO
--- old/pytest-doctestplus-0.6.1/PKG-INFO       2020-05-05 03:38:15.000000000 
+0200
+++ new/pytest-doctestplus-0.7.0/PKG-INFO       2020-05-20 16:58:54.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pytest-doctestplus
-Version: 0.6.1
+Version: 0.7.0
 Summary: Pytest plugin with advanced doctest features.
 Home-page: https://astropy.org
 Author: The Astropy Developers
@@ -233,6 +233,17 @@
                 >>> import asdf
                 >>> asdf.open('file.asdf')
         
+        Finally, it is possible to skip collecting doctests in entire 
subpackages by
+        using the ``doctest_subpackage_requires`` in the ``[tool:pytest]`` 
section of
+        the package's ``setup.cfg`` file. The syntax for this option is a list 
of
+        ``path = requirements``, e.g.::
+        
+            doctest_subpackage_requires =
+                astropy/wcs/* = scipy>2.0;numpy>1.14
+                astropy/cosmology/* = scipy>1.0
+        
+        Multiple requirements can be specified if separated by semicolons.
+        
         Remote Data
         ~~~~~~~~~~~
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/README.rst 
new/pytest-doctestplus-0.7.0/README.rst
--- old/pytest-doctestplus-0.6.1/README.rst     2019-11-12 20:41:45.000000000 
+0100
+++ new/pytest-doctestplus-0.7.0/README.rst     2020-05-20 16:56:16.000000000 
+0200
@@ -225,6 +225,17 @@
         >>> import asdf
         >>> asdf.open('file.asdf')
 
+Finally, it is possible to skip collecting doctests in entire subpackages by
+using the ``doctest_subpackage_requires`` in the ``[tool:pytest]`` section of
+the package's ``setup.cfg`` file. The syntax for this option is a list of
+``path = requirements``, e.g.::
+
+    doctest_subpackage_requires =
+        astropy/wcs/* = scipy>2.0;numpy>1.14
+        astropy/cosmology/* = scipy>1.0
+
+Multiple requirements can be specified if separated by semicolons.
+
 Remote Data
 ~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/licenses/README.rst 
new/pytest-doctestplus-0.7.0/licenses/README.rst
--- old/pytest-doctestplus-0.6.1/licenses/README.rst    2018-11-24 
09:23:22.000000000 +0100
+++ new/pytest-doctestplus-0.7.0/licenses/README.rst    1970-01-01 
01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-Licenses
-========
-
-This directory holds license and credit information for works this plugin is 
derived from or distributes, and/or datasets.
-
-The license file for this package itself is placed in the root directory of 
this repository.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/licenses/SYMPY_LICENSE.rst 
new/pytest-doctestplus-0.7.0/licenses/SYMPY_LICENSE.rst
--- old/pytest-doctestplus-0.6.1/licenses/SYMPY_LICENSE.rst     2018-11-24 
09:23:22.000000000 +0100
+++ new/pytest-doctestplus-0.7.0/licenses/SYMPY_LICENSE.rst     1970-01-01 
01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-Copyright (c) 2006-2014 SymPy Development Team
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-  a. Redistributions of source code must retain the above copyright notice,
-     this list of conditions and the following disclaimer.
-  b. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-  c. Neither the name of SymPy nor the names of its contributors
-     may be used to endorse or promote products derived from this software
-     without specific prior written permission.
-
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-doctestplus-0.6.1/pytest_doctestplus/__init__.py 
new/pytest-doctestplus-0.7.0/pytest_doctestplus/__init__.py
--- old/pytest-doctestplus-0.6.1/pytest_doctestplus/__init__.py 2020-05-05 
03:32:50.000000000 +0200
+++ new/pytest-doctestplus-0.7.0/pytest_doctestplus/__init__.py 2020-05-20 
16:57:20.000000000 +0200
@@ -3,4 +3,4 @@
 This package contains pytest plugins that are used by the astropy test suite.
 """
 
-__version__ = '0.6.1'
+__version__ = '0.7.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-doctestplus-0.6.1/pytest_doctestplus/plugin.py 
new/pytest-doctestplus-0.7.0/pytest_doctestplus/plugin.py
--- old/pytest-doctestplus-0.6.1/pytest_doctestplus/plugin.py   2020-05-05 
03:32:04.000000000 +0200
+++ new/pytest-doctestplus-0.7.0/pytest_doctestplus/plugin.py   2020-05-20 
16:56:16.000000000 +0200
@@ -115,6 +115,12 @@
                   type='linelist',
                   default=[])
 
+    parser.addini("doctest_subpackage_requires",
+                  "A list of paths to skip if requirements are not satisfied. 
Each item in the list "
+                  "should have the syntax path=req1;req2",
+                  type='linelist',
+                  default=[])
+
 
 def get_optionflags(parent):
     optionflags_str = parent.config.getini('doctest_optionflags')
@@ -168,12 +174,10 @@
                 try:
                     module = self.fspath.pyimport()
                 except ImportError:
-                    pytest.skip("unable to import module %r" % self.fspath)
-                    # NOT USED: While correct, this breaks existing behavior.
-                    # if self.config.getvalue("doctest_ignore_import_errors"):
-                    #     pytest.skip("unable to import module %r" % 
self.fspath)
-                    # else:
-                    #     raise
+                    if self.config.getvalue("doctest_ignore_import_errors"):
+                        pytest.skip("unable to import module %r" % self.fspath)
+                    else:
+                        raise
 
             options = get_optionflags(self) | FIX
 
@@ -410,6 +414,14 @@
                 self._ignore_paths.append(path)
                 break
 
+        for option in config.getini("doctest_subpackage_requires"):
+            subpackage_pattern, required = option.split('=', 1)
+            if path.check(fnmatch=subpackage_pattern.strip()):
+                required = required.strip().split(';')
+                if not DocTestFinderPlus.check_required_modules(required):
+                    self._ignore_paths.append(path)
+                    break
+
         return False
 
     def pytest_collect_file(self, path, parent):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/pytest_doctestplus/utils.py 
new/pytest-doctestplus-0.7.0/pytest_doctestplus/utils.py
--- old/pytest-doctestplus-0.6.1/pytest_doctestplus/utils.py    2019-11-12 
20:41:45.000000000 +0100
+++ new/pytest-doctestplus-0.7.0/pytest_doctestplus/utils.py    2020-05-20 
16:56:16.000000000 +0200
@@ -78,7 +78,6 @@
         try:
             return self._find_distribution(dist)
         except Exception as e:
-            logger.warning(e)
             return None
 
     def check(self, module):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-doctestplus-0.6.1/pytest_doctestplus.egg-info/PKG-INFO 
new/pytest-doctestplus-0.7.0/pytest_doctestplus.egg-info/PKG-INFO
--- old/pytest-doctestplus-0.6.1/pytest_doctestplus.egg-info/PKG-INFO   
2020-05-05 03:38:14.000000000 +0200
+++ new/pytest-doctestplus-0.7.0/pytest_doctestplus.egg-info/PKG-INFO   
2020-05-20 16:58:54.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pytest-doctestplus
-Version: 0.6.1
+Version: 0.7.0
 Summary: Pytest plugin with advanced doctest features.
 Home-page: https://astropy.org
 Author: The Astropy Developers
@@ -233,6 +233,17 @@
                 >>> import asdf
                 >>> asdf.open('file.asdf')
         
+        Finally, it is possible to skip collecting doctests in entire 
subpackages by
+        using the ``doctest_subpackage_requires`` in the ``[tool:pytest]`` 
section of
+        the package's ``setup.cfg`` file. The syntax for this option is a list 
of
+        ``path = requirements``, e.g.::
+        
+            doctest_subpackage_requires =
+                astropy/wcs/* = scipy>2.0;numpy>1.14
+                astropy/cosmology/* = scipy>1.0
+        
+        Multiple requirements can be specified if separated by semicolons.
+        
         Remote Data
         ~~~~~~~~~~~
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-doctestplus-0.6.1/pytest_doctestplus.egg-info/SOURCES.txt 
new/pytest-doctestplus-0.7.0/pytest_doctestplus.egg-info/SOURCES.txt
--- old/pytest-doctestplus-0.6.1/pytest_doctestplus.egg-info/SOURCES.txt        
2020-05-05 03:38:15.000000000 +0200
+++ new/pytest-doctestplus-0.7.0/pytest_doctestplus.egg-info/SOURCES.txt        
2020-05-20 16:58:54.000000000 +0200
@@ -1,13 +1,9 @@
-.gitignore
-.travis.yml
 CHANGES.rst
 LICENSE.rst
 MANIFEST.in
 README.rst
 setup.cfg
 setup.py
-licenses/README.rst
-licenses/SYMPY_LICENSE.rst
 pytest_doctestplus/__init__.py
 pytest_doctestplus/output_checker.py
 pytest_doctestplus/plugin.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/setup.py 
new/pytest-doctestplus-0.7.0/setup.py
--- old/pytest-doctestplus-0.6.1/setup.py       2020-05-05 03:33:35.000000000 
+0200
+++ new/pytest-doctestplus-0.7.0/setup.py       2020-05-20 16:57:37.000000000 
+0200
@@ -12,7 +12,7 @@
 
 setup(
     name='pytest-doctestplus',
-    version='0.6.1',
+    version='0.7.0',
     license='BSD',
     description='Pytest plugin with advanced doctest features.',
     long_description=readme(),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-doctestplus-0.6.1/tests/test_doctestplus.py 
new/pytest-doctestplus-0.7.0/tests/test_doctestplus.py
--- old/pytest-doctestplus-0.6.1/tests/test_doctestplus.py      2020-04-30 
08:00:07.000000000 +0200
+++ new/pytest-doctestplus-0.7.0/tests/test_doctestplus.py      2020-05-20 
16:56:16.000000000 +0200
@@ -1,3 +1,4 @@
+import os
 from distutils.version import LooseVersion
 from textwrap import dedent
 
@@ -651,3 +652,41 @@
 
     doctest.testfile(str(test2_rst), module_relative=False,
                      raise_on_error=True, verbose=False, encoding='utf-8')
+
+
+def test_doctest_subpackage_requires(testdir, caplog):
+
+    # Note that each entry below has different whitespace around the = to
+    # make sure that all cases work properly.
+
+    testdir.makeini(
+        """
+        [pytest]
+        doctest_subpackage_requires =
+            test/a/* = pytest>1
+            test/b/*= pytest>1;averyfakepackage>99999.9
+            test/c/*=anotherfakepackage>=22000.1.2
+    """
+    )
+    test = testdir.mkdir('test')
+    a = test.mkdir('a')
+    b = test.mkdir('b')
+    c = test.mkdir('c')
+
+    pyfile = dedent("""
+        def f():
+            '''
+            >>> 1
+            1
+            '''
+            pass
+    """)
+
+    a.join('testcode.py').write(pyfile)
+    b.join('testcode.py').write(pyfile)
+    c.join('testcode.py').write(pyfile)
+
+    reprec = testdir.inline_run(test, "--doctest-plus")
+    reprec.assertoutcome(passed=1)
+    assert reprec.listoutcomes()[0][0].location[0] == os.path.join('test', 
'a', 'testcode.py')
+    assert caplog.text == ''


Reply via email to