Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-sybil for openSUSE:Factory 
checked in at 2021-03-02 14:42:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sybil (Old)
 and      /work/SRC/openSUSE:Factory/.python-sybil.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sybil"

Tue Mar  2 14:42:16 2021 rev:11 rq:874534 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sybil/python-sybil.changes        
2020-09-04 11:00:56.390682113 +0200
+++ /work/SRC/openSUSE:Factory/.python-sybil.new.2378/python-sybil.changes      
2021-03-02 15:29:48.465947809 +0100
@@ -1,0 +2,12 @@
+Mon Feb 22 19:14:00 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 2.0.1
+  * Make :class:`~sybil.parsers.doctest.DocTestParser` more
+    permissive with respect to tabs in documents. Tabs that aren't
+    in the doctest block not longer cause parsing of the document to
+    fail.
+- Release 2.0.0
+  * Drop support for nose.
+  * Handle encoded data returned by doctest execution on Python 2.
+
+-------------------------------------------------------------------

Old:
----
  sybil-1.4.0.tar.gz

New:
----
  sybil-2.0.1.tar.gz

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

Other differences:
------------------
++++++ python-sybil.spec ++++++
--- /var/tmp/diff_new_pack.0879rt/_old  2021-03-02 15:29:48.941948119 +0100
+++ /var/tmp/diff_new_pack.0879rt/_new  2021-03-02 15:29:48.941948119 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-sybil
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,33 +18,30 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-sybil
-Version:        1.4.0
+Version:        2.0.1
 Release:        0
 Summary:        Automated testing of examples in documentation
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/cjw296/sybil
 Source:         
https://files.pythonhosted.org/packages/source/s/sybil/sybil-%{version}.tar.gz
-BuildRequires:  %{python_module nose}
-BuildRequires:  %{python_module pytest >= 3.5.0}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools-git}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Recommends:     python-pytest
-Suggests:       python-nose
 BuildArch:      noarch
 %python_subpackages
 
 %description
 python-sybil provides a way to test examples in one's documentation by parsing
 them from the documentation source and evaluating the parsed examples as part
-of the normal test run. Integration is provided for the three main Python
-test runners.
+of the normal test run. Integration is provided for the main Python test 
runners.
 
 %prep
 %setup -q -n sybil-%{version}
-sed -i '/build=/d;/coveralls/d' setup.py
+sed -i '/pytest-cov/ d'  setup.py
 
 %build
 %python_build
@@ -59,6 +56,7 @@
 %files %{python_files}
 %doc README.rst docs/changes.rst
 %license docs/license.rst
-%{python_sitelib}/*
+%{python_sitelib}/sybil
+%{python_sitelib}/sybil-%{version}*-info
 
 %changelog

++++++ sybil-1.4.0.tar.gz -> sybil-2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/PKG-INFO new/sybil-2.0.1/PKG-INFO
--- old/sybil-1.4.0/PKG-INFO    2020-08-05 19:50:37.000000000 +0200
+++ new/sybil-2.0.1/PKG-INFO    2020-11-29 18:08:42.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sybil
-Version: 1.4.0
+Version: 2.0.1
 Summary: Automated testing for the examples in your documentation.
 Home-page: https://github.com/cjw296/sybil
 Author: Chris Withers
@@ -20,7 +20,7 @@
         
         This library provides a way to test examples in your documentation by 
parsing
         them from the documentation source and evaluating the parsed examples 
as part of
-        your normal test run. Integration is provided for the three main 
Python test
+        your normal test run. Integration is provided for the main Python test
         runners.
         
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/README.rst new/sybil-2.0.1/README.rst
--- old/sybil-1.4.0/README.rst  2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/README.rst  2020-11-29 18:08:27.000000000 +0100
@@ -12,5 +12,5 @@
 
 This library provides a way to test examples in your documentation by parsing
 them from the documentation source and evaluating the parsed examples as part 
of
-your normal test run. Integration is provided for the three main Python test
+your normal test run. Integration is provided for the main Python test
 runners.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/docs/changes.rst 
new/sybil-2.0.1/docs/changes.rst
--- old/sybil-1.4.0/docs/changes.rst    2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/docs/changes.rst    2020-11-29 18:08:27.000000000 +0100
@@ -1,6 +1,20 @@
 Changes
 =======
 
+2.0.1 (29 Nov 2020)
+-------------------
+
+- Make :class:`~sybil.parsers.doctest.DocTestParser` more permissive with 
respect
+  to tabs in documents. Tabs that aren't in the doctest block not longer cause
+  parsing of the document to fail.
+
+2.0.0 (17 Nov 2020)
+-------------------
+
+- Drop support for nose.
+
+- Handle encoded data returned by doctest execution on Python 2.
+
 1.4.0 (5 Aug 2020)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sybil-1.4.0/docs/example/example_nose/test_example_docs.py 
new/sybil-2.0.1/docs/example/example_nose/test_example_docs.py
--- old/sybil-1.4.0/docs/example/example_nose/test_example_docs.py      
2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/docs/example/example_nose/test_example_docs.py      
1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-from os import chdir, getcwd
-from shutil import rmtree
-from tempfile import mkdtemp
-from sybil import Sybil
-from sybil.parsers.codeblock import CodeBlockParser
-from sybil.parsers.doctest import DocTestParser
-
-
-def sybil_setup(namespace):
-    # there are better ways to do temp directories, but it's a simple example:
-    namespace['path'] = path = mkdtemp()
-    namespace['cwd'] = getcwd()
-    chdir(path)
-
-def sybil_teardown(namespace):
-    chdir(namespace['cwd'])
-    rmtree(namespace['path'])
-
-load_tests = Sybil(
-    parsers=[
-        DocTestParser(),
-        CodeBlockParser(future_imports=['print_function']),
-    ],
-    path='../docs', pattern='*.rst',
-    setup=sybil_setup, teardown=sybil_teardown
-).nose()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/docs/index.rst 
new/sybil-2.0.1/docs/index.rst
--- old/sybil-1.4.0/docs/index.rst      2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/docs/index.rst      2020-11-29 18:08:27.000000000 +0100
@@ -19,7 +19,7 @@
 
 Sybil is heavily inspired by `Manuel`__, which was named after a
 `Fawlty Towers`__ character, and so it seemed only right to pick another
-Fawtly Towers character name for this library.
+Fawlty Towers character name for this library.
 
 __ http://pythonhosted.org/manuel/index.html
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/docs/use.rst new/sybil-2.0.1/docs/use.rst
--- old/sybil-1.4.0/docs/use.rst        2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/docs/use.rst        2020-11-29 18:08:27.000000000 +0100
@@ -111,33 +111,3 @@
 :class:`~sybil.document.Document.namespace`.
 
 The ``fixtures`` parameter, is ignored.
-
-.. _nose_integration:
-
-nose
-~~~~
-
-Sybil acts as a test loader plugin for nose that provides a
-``--test-suite-func`` ooption which defaults to ``load_tests``, so making
-nose respect the `load_tests protocol`__.
-
-__ https://docs.python.org/3/library/unittest.html#load-tests-protocol
-
-Provided Sybil is activated as a nose plugin, the following code, when placed 
in
-a test module where nose can find it, will result in your documentation 
examples
-being checked:
-
-.. literalinclude:: example/example_nose/test_example_docs.py
-
-The ``path`` parameter gives the path, relative to the file containing this
-code, that contains the documentation source files.
-
-The file glob passed as ``pattern`` should match any documentation source
-files that contain examples which you would like to be checked.
-
-Any setup or teardown necessary for your tests can be carried out in
-callables passed to the ``setup`` and ``teardown`` parameters,
-which are both called with the :class:`~sybil.document.Document`
-:class:`~sybil.document.Document.namespace`.
-
-The ``fixtures`` parameter is ignored.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/setup.py new/sybil-2.0.1/setup.py
--- old/sybil-1.4.0/setup.py    2020-08-05 19:50:19.000000000 +0200
+++ new/sybil-2.0.1/setup.py    2020-11-29 18:08:27.000000000 +0100
@@ -9,7 +9,7 @@
 
 setup(
     name='sybil',
-    version='1.4.0',
+    version='2.0.1',
     author='Chris Withers',
     author_email='ch...@withers.org',
     license='MIT',
@@ -31,15 +31,9 @@
     include_package_data=True,
     extras_require=dict(
         test=[
-            'nose',
             'pytest>=3.5.0',
             'pytest-cov',
             ],
-        build=['sphinx', 'pkginfo', 'setuptools-git', 'twine', 'wheel']
+        build=['sphinx', 'setuptools-git', 'twine', 'wheel']
     ),
-    entry_points = {
-        'nose.plugins.0.10': [
-            'sybil = sybil.integration.nose:Plugin'
-            ]
-        },
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil/integration/nose.py 
new/sybil-2.0.1/sybil/integration/nose.py
--- old/sybil-1.4.0/sybil/integration/nose.py   2020-08-05 19:50:19.000000000 
+0200
+++ new/sybil-2.0.1/sybil/integration/nose.py   1970-01-01 01:00:00.000000000 
+0100
@@ -1,41 +0,0 @@
-from __future__ import absolute_import
-
-from nose.plugins import Plugin as NosePlugin
-from nose.loader import TestLoader
-
-
-class SybilLoader(TestLoader):
-
-    def __init__(self, test_suite_func, config):
-        super(SybilLoader, self).__init__(config)
-        self.test_suite_func = test_suite_func
-
-    def loadTestsFromModule(self, module, path=None, discovered=False):
-        suite_func = getattr(module, self.test_suite_func, None)
-        if suite_func is not None:
-            return suite_func()
-
-        return super(SybilLoader, self).loadTestsFromModule(
-            module, path, discovered
-            )
-
-
-class Plugin(NosePlugin):
-
-    name = 'sybil'
-
-    enabled = True
-
-    def options(self, parser, env):
-        parser.add_option(
-            "--test-suite-func", action="store",
-            dest="test_suite_func",
-            default='load_tests',
-            help="A function in modules that will return a TestSuite. "
-                 "Defaults to 'load_tests'.")
-
-    def configure(self, options, config):
-        self.test_suite_func = options.test_suite_func
-
-    def prepareTestLoader(self, loader):
-        return SybilLoader(self.test_suite_func, loader.config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil/integration/pytest.py 
new/sybil-2.0.1/sybil/integration/pytest.py
--- old/sybil-1.4.0/sybil/integration/pytest.py 2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/sybil/integration/pytest.py 2020-11-29 18:08:27.000000000 
+0100
@@ -70,7 +70,7 @@
             return self.session
 
     def setup(self):
-        fixtures.fillfixtures(self)
+        self._request._fillfixtures()
         for name, fixture in self.funcargs.items():
             self.example.namespace[name] = fixture
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil/parsers/capture.py 
new/sybil-2.0.1/sybil/parsers/capture.py
--- old/sybil-1.4.0/sybil/parsers/capture.py    2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/sybil/parsers/capture.py    2020-11-29 18:08:27.000000000 
+0100
@@ -75,7 +75,7 @@
 
             if end_index - start_index < 2:
                 raise ValueError((
-                    "couldn't find the start of the block to match"
+                    "couldn't find the start of the block to match "
                     "%r on line %i of %s"
                 ) % (directive.group(), end_index+1, document.path))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil/parsers/doctest.py 
new/sybil-2.0.1/sybil/parsers/doctest.py
--- old/sybil-1.4.0/sybil/parsers/doctest.py    2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/sybil/parsers/doctest.py    2020-11-29 18:08:27.000000000 
+0100
@@ -6,6 +6,7 @@
     DocTestParser as BaseDocTestParser,
     DocTestRunner as BaseDocTestRunner,
     Example as DocTestExample,
+    OutputChecker as BaseOutputChecker,
     _unittest_reportflags,
     register_optionflag
 )
@@ -37,11 +38,38 @@
         self.globs = globs
 
 
+class OutputChecker(BaseOutputChecker):
+
+    def __init__(self, encoding):
+        self.encoding = encoding
+
+    def _decode(self, got):
+        decode = getattr(got, 'decode', None)
+        if decode is None:
+            return got
+        return decode(self.encoding)
+
+    def check_output(self, want, got, optionflags):
+        return BaseOutputChecker.check_output(
+            self, want, self._decode(got), optionflags
+        )
+
+    def output_difference(self, example, got, optionflags):
+        return BaseOutputChecker.output_difference(
+            self, example, self._decode(got), optionflags
+        )
+
+
 class DocTestRunner(BaseDocTestRunner):
 
-    def __init__(self, optionflags=0):
+    def __init__(self, optionflags, encoding):
         optionflags |= _unittest_reportflags
-        BaseDocTestRunner.__init__(self, verbose=False, 
optionflags=optionflags)
+        BaseDocTestRunner.__init__(
+            self,
+            checker=OutputChecker(encoding),
+            verbose=False,
+            optionflags=optionflags,
+        )
 
     def _failure_header(self, test, example):
         return ''
@@ -63,19 +91,18 @@
     :param optionflags: 
         :ref:`doctest option flags<option-flags-and-directives>` to use
         when evaluating the examples found by this parser.
+
+    :param encoding:
+        If on Python 2, this encoding will be used to decode the string
+        resulting from execution of the examples.
     """
-    def __init__(self, optionflags=0):
-        self.runner = DocTestRunner(optionflags=optionflags)
+    def __init__(self, optionflags=0, encoding='utf-8'):
+        self.runner = DocTestRunner(optionflags, encoding)
 
     def __call__(self, document):
         # a cut down version of doctest.DocTestParser.parse:
 
         text = document.text
-        first_tab = text.find('\t')
-        if first_tab != -1:
-            raise ValueError('tabs are not supported, first one found at '+(
-                document.line_column(first_tab)
-            ))
         # If all lines begin with the same indentation, then strip it.
         min_indent = self._min_indent(text)
         if min_indent > 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil/sybil.py 
new/sybil-2.0.1/sybil/sybil.py
--- old/sybil-1.4.0/sybil/sybil.py      2020-08-05 19:50:20.000000000 +0200
+++ new/sybil-2.0.1/sybil/sybil.py      2020-11-29 18:08:27.000000000 +0100
@@ -121,10 +121,8 @@
 
     def unittest(self):
         """
-        The helper method for when you use either 
-        :ref:`unitttest_integration` or :ref:`nose_integration`.
+        The helper method for when you use :ref:`unitttest_integration`.
         """
         from .integration.unittest import unittest_integration
         return unittest_integration(self)
 
-    nose = unittest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil.egg-info/PKG-INFO 
new/sybil-2.0.1/sybil.egg-info/PKG-INFO
--- old/sybil-1.4.0/sybil.egg-info/PKG-INFO     2020-08-05 19:50:37.000000000 
+0200
+++ new/sybil-2.0.1/sybil.egg-info/PKG-INFO     2020-11-29 18:08:42.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sybil
-Version: 1.4.0
+Version: 2.0.1
 Summary: Automated testing for the examples in your documentation.
 Home-page: https://github.com/cjw296/sybil
 Author: Chris Withers
@@ -20,7 +20,7 @@
         
         This library provides a way to test examples in your documentation by 
parsing
         them from the documentation source and evaluating the parsed examples 
as part of
-        your normal test run. Integration is provided for the three main 
Python test
+        your normal test run. Integration is provided for the main Python test
         runners.
         
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil.egg-info/SOURCES.txt 
new/sybil-2.0.1/sybil.egg-info/SOURCES.txt
--- old/sybil-1.4.0/sybil.egg-info/SOURCES.txt  2020-08-05 19:50:37.000000000 
+0200
+++ new/sybil-2.0.1/sybil.egg-info/SOURCES.txt  2020-11-29 18:08:42.000000000 
+0100
@@ -20,8 +20,6 @@
 docs/example/pytest.ini
 docs/example/docs/conftest.py
 docs/example/docs/example.rst
-docs/example/example_nose/__init__.py
-docs/example/example_nose/test_example_docs.py
 docs/example/example_unittest/__init__.py
 docs/example/example_unittest/test_example_docs.py
 sybil/__init__.py
@@ -33,12 +31,10 @@
 sybil.egg-info/PKG-INFO
 sybil.egg-info/SOURCES.txt
 sybil.egg-info/dependency_links.txt
-sybil.egg-info/entry_points.txt
 sybil.egg-info/not-zip-safe
 sybil.egg-info/requires.txt
 sybil.egg-info/top_level.txt
 sybil/integration/__init__.py
-sybil/integration/nose.py
 sybil/integration/pytest.py
 sybil/integration/unittest.py
 sybil/parsers/__init__.py
@@ -58,9 +54,6 @@
 tests/test_sybil.py
 tests/functional/functional_unittest/__init__.py
 tests/functional/functional_unittest/test_unittest.py
-tests/functional/nose/__init__.py
-tests/functional/nose/test_nose.py
-tests/functional/nose/test_other.py
 tests/functional/pytest/conftest.py
 tests/functional/pytest/fail.rst
 tests/functional/pytest/pass.rst
@@ -72,6 +65,7 @@
 tests/samples/codeblock_future_imports.txt
 tests/samples/doctest.txt
 tests/samples/doctest_fail.txt
+tests/samples/doctest_irrelevant_tabs.txt
 tests/samples/doctest_literals.txt
 tests/samples/doctest_min_indent.txt
 tests/samples/doctest_tabs.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil.egg-info/entry_points.txt 
new/sybil-2.0.1/sybil.egg-info/entry_points.txt
--- old/sybil-1.4.0/sybil.egg-info/entry_points.txt     2020-08-05 
19:50:37.000000000 +0200
+++ new/sybil-2.0.1/sybil.egg-info/entry_points.txt     1970-01-01 
01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-[nose.plugins.0.10]
-sybil = sybil.integration.nose:Plugin
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/sybil.egg-info/requires.txt 
new/sybil-2.0.1/sybil.egg-info/requires.txt
--- old/sybil-1.4.0/sybil.egg-info/requires.txt 2020-08-05 19:50:37.000000000 
+0200
+++ new/sybil-2.0.1/sybil.egg-info/requires.txt 2020-11-29 18:08:42.000000000 
+0100
@@ -1,12 +1,10 @@
 
 [build]
 sphinx
-pkginfo
 setuptools-git
 twine
 wheel
 
 [test]
-nose
 pytest>=3.5.0
 pytest-cov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/functional/nose/test_nose.py 
new/sybil-2.0.1/tests/functional/nose/test_nose.py
--- old/sybil-1.4.0/tests/functional/nose/test_nose.py  2020-08-05 
19:50:20.000000000 +0200
+++ new/sybil-2.0.1/tests/functional/nose/test_nose.py  1970-01-01 
01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-from __future__ import print_function
-
-import re
-from functools import partial
-
-from sybil import Sybil, Region
-
-
-def check(letter, example):
-    print(example.namespace['x'])
-    example.namespace['x'] += 1
-    text, expected = example.parsed
-    actual = text.count(letter)
-    if actual != expected:
-        message = '{} count was {} instead of {}'.format(
-            letter, actual, expected
-        )
-        if letter=='X':
-            raise ValueError(message)
-        return message
-
-
-def parse_for(letter, document):
-    for m in re.finditer(r'(%s+) (\d+) check' % letter, document.text):
-        yield Region(m.start(), m.end(),
-                     (m.group(1), int(m.group(2))),
-                     partial(check, letter))
-
-
-def sybil_setup(namespace):
-    print('sybil setup')
-    namespace['x'] = 0
-
-
-def sybil_teardown(namespace):
-    print('sybil teardown', namespace['x'])
-
-
-load_tests = Sybil(
-    [partial(parse_for, 'X'), partial(parse_for, 'Y')],
-    path='../pytest', pattern='*.rst',
-    setup=sybil_setup, teardown=sybil_teardown
-).nose()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/functional/nose/test_other.py 
new/sybil-2.0.1/tests/functional/nose/test_other.py
--- old/sybil-1.4.0/tests/functional/nose/test_other.py 2020-08-05 
19:50:20.000000000 +0200
+++ new/sybil-2.0.1/tests/functional/nose/test_other.py 1970-01-01 
01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-def test_it():
-    pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/helpers.py 
new/sybil-2.0.1/tests/helpers.py
--- old/sybil-1.4.0/tests/helpers.py    2020-08-05 19:50:20.000000000 +0200
+++ new/sybil-2.0.1/tests/helpers.py    2020-11-29 18:08:27.000000000 +0100
@@ -1,3 +1,4 @@
+from io import open
 from os.path import dirname, join
 
 from sybil.document import Document
@@ -10,7 +11,7 @@
 
 def document_from_sample(name):
     path = sample_path(name)
-    with open(path) as source:
+    with open(path, encoding='ascii') as source:
         return Document(source.read(), path)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sybil-1.4.0/tests/samples/doctest_irrelevant_tabs.txt 
new/sybil-2.0.1/tests/samples/doctest_irrelevant_tabs.txt
--- old/sybil-1.4.0/tests/samples/doctest_irrelevant_tabs.txt   1970-01-01 
01:00:00.000000000 +0100
+++ new/sybil-2.0.1/tests/samples/doctest_irrelevant_tabs.txt   2020-11-29 
18:08:27.000000000 +0100
@@ -0,0 +1,4 @@
+These  tabs    don't   matter.
+
+>>> 1 + 1
+2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/test_capture.py 
new/sybil-2.0.1/tests/test_capture.py
--- old/sybil-1.4.0/tests/test_capture.py       2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/tests/test_capture.py       2020-11-29 18:08:27.000000000 
+0100
@@ -1,5 +1,6 @@
 import pytest
 from sybil.parsers.capture import parse_captures
+from sybil.compat import PY3
 from tests.helpers import document_from_sample, sample_path, evaluate_region
 
 
@@ -32,8 +33,12 @@
     document = document_from_sample('capture_bad_indent1.txt')
     with pytest.raises(ValueError) as excinfo:
         list(parse_captures(document))
+    if PY3:
+        block = "'        .. -> foo'"
+    else:
+        block = "u'        .. -> foo'"
     assert str(excinfo.value) == (
-            "couldn't find the start of the block to match'        .. -> foo' "
+            "couldn't find the start of the block to match "+block+" "
             "on line 5 of "+sample_path('capture_bad_indent1.txt')
         )
 
@@ -42,7 +47,11 @@
     document = document_from_sample('capture_bad_indent2.txt')
     with pytest.raises(ValueError) as excinfo:
         list(parse_captures(document))
+    if PY3:
+        block = "'    .. -> foo'"
+    else:
+        block = "u'    .. -> foo'"
     assert str(excinfo.value) == (
-            "couldn't find the start of the block to match'    .. -> foo' "
+            "couldn't find the start of the block to match "+block+" "
             "on line 5 of "+sample_path('capture_bad_indent2.txt')
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/test_doc_example.py 
new/sybil-2.0.1/tests/test_doc_example.py
--- old/sybil-1.4.0/tests/test_doc_example.py   2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/tests/test_doc_example.py   2020-11-29 18:08:27.000000000 
+0100
@@ -3,7 +3,6 @@
 from os.path import dirname, join
 from unittest.main import main as unittest_main
 from unittest.runner import TextTestRunner
-from nose.core import run_exit as NoseMain, TextTestRunner as NoseRunner
 from pytest import main as pytest_main
 
 example_dir = join(dirname(__file__), pardir, 'docs', 'example')
@@ -32,21 +31,4 @@
     )
     assert main.result.testsRun == 3
     assert len(main.result.failures) == 0
-    assert len(main.result.errors) == 0
-
-
-def test_nose(capsys):
-    class ResultStoringMain(NoseMain):
-        def runTests(self):
-            self.testRunner = NoseRunner(stream=sys.stdout,
-                                         verbosity=self.config.verbosity,
-                                         config=self.config)
-            self.result = self.testRunner.run(self.test)
-
-    main = ResultStoringMain(
-        module=None,
-        argv=['x', join(example_dir, 'example_nose')]
-    )
-    assert main.result.testsRun == 3
-    assert len(main.result.failures) == 0
     assert len(main.result.errors) == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/test_doctest.py 
new/sybil-2.0.1/tests/test_doctest.py
--- old/sybil-1.4.0/tests/test_doctest.py       2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/tests/test_doctest.py       2020-11-29 18:08:27.000000000 
+0100
@@ -1,3 +1,4 @@
+# coding=utf-8
 from doctest import REPORT_NDIFF, ELLIPSIS
 
 import pytest
@@ -68,9 +69,21 @@
 
 def test_tabs():
     path = sample_path('doctest_tabs.txt')
-    parser = DocTestParser(optionflags=REPORT_NDIFF|ELLIPSIS)
-    with pytest.raises(ValueError) as excinfo:
+    parser = DocTestParser()
+    with pytest.raises(ValueError):
         Document.parse(path, parser)
-    assert str(excinfo.value) == (
-        'tabs are not supported, first one found at line 2, column 4'
-    )
+
+
+def test_irrelevant_tabs():
+    document = document_from_sample('doctest_irrelevant_tabs.txt')
+    regions = list(DocTestParser()(document))
+    assert len(regions) == 1
+    namespace = document.namespace
+    assert evaluate_region(regions[0], namespace) == ''
+
+
+def test_unicode():
+    document = Document(u'>>> print("??????")\n??????', path='dummy.rst')
+    example, = DocTestParser()(document)
+    namespace = document.namespace
+    assert evaluate_region(example, namespace) == ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.4.0/tests/test_functional.py 
new/sybil-2.0.1/tests/test_functional.py
--- old/sybil-1.4.0/tests/test_functional.py    2020-08-05 19:50:20.000000000 
+0200
+++ new/sybil-2.0.1/tests/test_functional.py    2020-11-29 18:08:27.000000000 
+0100
@@ -3,7 +3,6 @@
 from unittest.main import main as unittest_main
 from unittest.runner import TextTestRunner
 
-from nose.core import run_exit as NoseMain, TextTestRunner as NoseRunner
 from pytest import main as pytest_main
 
 functional_test_dir = join(dirname(__file__), 'functional')
@@ -146,25 +145,3 @@
     assert main.result.testsRun == 8
     assert len(main.result.failures) == 1
     assert len(main.result.errors) == 1
-
-
-def test_nose(capsys):
-    class ResultStoringMain(NoseMain):
-        def runTests(self):
-            self.testRunner = NoseRunner(stream=sys.stdout,
-                                         verbosity=self.config.verbosity,
-                                         config=self.config)
-            self.result = self.testRunner.run(self.test)
-
-    main = ResultStoringMain(
-        module=None,
-        argv=['x', '-vs', join(functional_test_dir, 'nose')]
-    )
-    assert main.result.testsRun == 9
-    assert len(main.result.failures) == 1
-    assert len(main.result.errors) == 1
-
-    out, err = capsys.readouterr()
-    assert err == ''
-    out = Finder(out)
-    common_checks(out)

Reply via email to