|
|
76ff05 |
diff -ru testtools-2.4.0-orig/requirements.txt testtools-2.4.0/requirements.txt
|
|
|
76ff05 |
--- testtools-2.4.0-orig/requirements.txt 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/requirements.txt 2020-04-03 17:03:31.776205598 -0700
|
|
|
76ff05 |
@@ -4,6 +4,4 @@
|
|
|
76ff05 |
# 'mimeparse' has not been uploaded by the maintainer with Python3 compat
|
|
|
76ff05 |
# but someone kindly uploaded a fixed version as 'python-mimeparse'.
|
|
|
76ff05 |
python-mimeparse
|
|
|
76ff05 |
-unittest2>=1.0.0
|
|
|
76ff05 |
-traceback2
|
|
|
76ff05 |
six>=1.4.0
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/setup.cfg testtools-2.4.0/setup.cfg
|
|
|
76ff05 |
--- testtools-2.4.0-orig/setup.cfg 2020-03-14 07:30:56.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/setup.cfg 2020-04-03 17:04:37.605592118 -0700
|
|
|
76ff05 |
@@ -28,7 +28,6 @@
|
|
|
76ff05 |
test =
|
|
|
76ff05 |
testscenarios
|
|
|
76ff05 |
testresources
|
|
|
76ff05 |
- unittest2>=1.1.0
|
|
|
76ff05 |
|
|
|
76ff05 |
[files]
|
|
|
76ff05 |
packages = testtools
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/compat.py testtools-2.4.0/testtools/compat.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/compat.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/compat.py 2020-04-03 17:02:34.047743583 -0700
|
|
|
76ff05 |
@@ -33,10 +33,7 @@
|
|
|
76ff05 |
# To let setup.py work, make this a conditional import.
|
|
|
76ff05 |
linecache = try_import('linecache2')
|
|
|
76ff05 |
|
|
|
76ff05 |
-try:
|
|
|
76ff05 |
- from testtools import _compat2x as _compat
|
|
|
76ff05 |
-except SyntaxError:
|
|
|
76ff05 |
- from testtools import _compat3x as _compat
|
|
|
76ff05 |
+from testtools import _compat3x as _compat
|
|
|
76ff05 |
|
|
|
76ff05 |
reraise = _compat.reraise
|
|
|
76ff05 |
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/content.py testtools-2.4.0/testtools/content.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/content.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/content.py 2020-04-03 17:05:23.037168731 -0700
|
|
|
76ff05 |
@@ -17,10 +17,9 @@
|
|
|
76ff05 |
import json
|
|
|
76ff05 |
import os
|
|
|
76ff05 |
import sys
|
|
|
76ff05 |
+import traceback
|
|
|
76ff05 |
|
|
|
76ff05 |
from extras import try_import
|
|
|
76ff05 |
-# To let setup.py work, make this a conditional import.
|
|
|
76ff05 |
-traceback = try_import('traceback2')
|
|
|
76ff05 |
|
|
|
76ff05 |
from testtools.compat import (
|
|
|
76ff05 |
_b,
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/run.py testtools-2.4.0/testtools/run.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/run.py 2015-11-07 09:27:33.000000000 -0800
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/run.py 2020-04-03 17:07:07.353196586 -0700
|
|
|
76ff05 |
@@ -12,11 +12,9 @@
|
|
|
76ff05 |
from functools import partial
|
|
|
76ff05 |
import os.path
|
|
|
76ff05 |
import sys
|
|
|
76ff05 |
+import unittest
|
|
|
76ff05 |
|
|
|
76ff05 |
from extras import safe_hasattr, try_imports
|
|
|
76ff05 |
-# To let setup.py work, make this a conditional import.
|
|
|
76ff05 |
-unittest = try_imports(['unittest2', 'unittest'])
|
|
|
76ff05 |
-
|
|
|
76ff05 |
from testtools import TextTestResult, testcase
|
|
|
76ff05 |
from testtools.compat import classtypes, istext, unicode_output_stream
|
|
|
76ff05 |
from testtools.testsuite import filter_by_ids, iterate_tests, sorted_tests
|
|
|
76ff05 |
@@ -50,7 +48,6 @@
|
|
|
76ff05 |
describing things that failed to import.
|
|
|
76ff05 |
"""
|
|
|
76ff05 |
unittest_import_strs = set([
|
|
|
76ff05 |
- 'unittest2.loader.ModuleImportFailure.',
|
|
|
76ff05 |
'unittest.loader.ModuleImportFailure.',
|
|
|
76ff05 |
'discover.ModuleImportFailure.'
|
|
|
76ff05 |
])
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/testcase.py testtools-2.4.0/testtools/testcase.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/testcase.py 2019-11-28 00:58:29.000000000 -0800
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/testcase.py 2020-04-03 17:27:49.122395535 -0700
|
|
|
76ff05 |
@@ -19,22 +19,15 @@
|
|
|
76ff05 |
import copy
|
|
|
76ff05 |
import functools
|
|
|
76ff05 |
import itertools
|
|
|
76ff05 |
+import six
|
|
|
76ff05 |
import sys
|
|
|
76ff05 |
+import unittest
|
|
|
76ff05 |
import warnings
|
|
|
76ff05 |
|
|
|
76ff05 |
from extras import (
|
|
|
76ff05 |
safe_hasattr,
|
|
|
76ff05 |
try_import,
|
|
|
76ff05 |
)
|
|
|
76ff05 |
-# To let setup.py work, make this a conditional import.
|
|
|
76ff05 |
-# Don't use extras.try_imports, as it interferes with PyCharm's unittest
|
|
|
76ff05 |
-# detection algorithm. See: https://youtrack.jetbrains.com/issue/PY-26630
|
|
|
76ff05 |
-try:
|
|
|
76ff05 |
- import unittest2 as unittest
|
|
|
76ff05 |
-except ImportError:
|
|
|
76ff05 |
- import unittest
|
|
|
76ff05 |
-import six
|
|
|
76ff05 |
-
|
|
|
76ff05 |
from testtools import (
|
|
|
76ff05 |
content,
|
|
|
76ff05 |
)
|
|
|
76ff05 |
@@ -66,23 +59,8 @@
|
|
|
76ff05 |
|
|
|
76ff05 |
wraps = try_import('functools.wraps')
|
|
|
76ff05 |
|
|
|
76ff05 |
-
|
|
|
76ff05 |
-class TestSkipped(Exception):
|
|
|
76ff05 |
- """Raised within TestCase.run() when a test is skipped."""
|
|
|
76ff05 |
-TestSkipped = try_import('unittest.case.SkipTest', TestSkipped)
|
|
|
76ff05 |
-TestSkipped = try_import('unittest2.case.SkipTest', TestSkipped)
|
|
|
76ff05 |
-
|
|
|
76ff05 |
-
|
|
|
76ff05 |
-class _UnexpectedSuccess(Exception):
|
|
|
76ff05 |
- """An unexpected success was raised.
|
|
|
76ff05 |
-
|
|
|
76ff05 |
- Note that this exception is private plumbing in testtools' testcase
|
|
|
76ff05 |
- module.
|
|
|
76ff05 |
- """
|
|
|
76ff05 |
-_UnexpectedSuccess = try_import(
|
|
|
76ff05 |
- 'unittest.case._UnexpectedSuccess', _UnexpectedSuccess)
|
|
|
76ff05 |
-_UnexpectedSuccess = try_import(
|
|
|
76ff05 |
- 'unittest2.case._UnexpectedSuccess', _UnexpectedSuccess)
|
|
|
76ff05 |
+from unittest.case import SkipTest as TestSkipped
|
|
|
76ff05 |
+from unittest.case import _UnexpectedSuccess
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
class _ExpectedFailure(Exception):
|
|
|
76ff05 |
@@ -93,8 +71,6 @@
|
|
|
76ff05 |
"""
|
|
|
76ff05 |
_ExpectedFailure = try_import(
|
|
|
76ff05 |
'unittest.case._ExpectedFailure', _ExpectedFailure)
|
|
|
76ff05 |
-_ExpectedFailure = try_import(
|
|
|
76ff05 |
- 'unittest2.case._ExpectedFailure', _ExpectedFailure)
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
# Copied from unittest before python 3.4 release. Used to maintain
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/test_compat.py testtools-2.4.0/testtools/tests/test_compat.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/test_compat.py 2019-11-28 00:58:29.000000000 -0800
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/test_compat.py 2020-04-03 17:11:59.211436348 -0700
|
|
|
76ff05 |
@@ -4,7 +4,7 @@
|
|
|
76ff05 |
|
|
|
76ff05 |
import ast
|
|
|
76ff05 |
import io
|
|
|
76ff05 |
-import linecache2 as linecache
|
|
|
76ff05 |
+import linecache
|
|
|
76ff05 |
import os
|
|
|
76ff05 |
import sys
|
|
|
76ff05 |
import tempfile
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/test_run.py testtools-2.4.0/testtools/tests/test_run.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/test_run.py 2015-11-07 09:27:33.000000000 -0800
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/test_run.py 2020-04-03 17:30:21.725938899 -0700
|
|
|
76ff05 |
@@ -10,7 +10,7 @@
|
|
|
76ff05 |
from extras import try_import
|
|
|
76ff05 |
fixtures = try_import('fixtures')
|
|
|
76ff05 |
testresources = try_import('testresources')
|
|
|
76ff05 |
-import unittest2
|
|
|
76ff05 |
+import unittest
|
|
|
76ff05 |
|
|
|
76ff05 |
import testtools
|
|
|
76ff05 |
from testtools import TestCase, run, skipUnless
|
|
|
76ff05 |
@@ -195,13 +195,13 @@
|
|
|
76ff05 |
broken = self.useFixture(SampleTestFixture(broken=True))
|
|
|
76ff05 |
out = StringIO()
|
|
|
76ff05 |
# XXX: http://bugs.python.org/issue22811
|
|
|
76ff05 |
- unittest2.defaultTestLoader._top_level_dir = None
|
|
|
76ff05 |
+ unittest.defaultTestLoader._top_level_dir = None
|
|
|
76ff05 |
exc = self.assertRaises(
|
|
|
76ff05 |
SystemExit,
|
|
|
76ff05 |
run.main, ['prog', 'discover', '-l', broken.package.base, '*.py'], out)
|
|
|
76ff05 |
self.assertEqual(2, exc.args[0])
|
|
|
76ff05 |
self.assertThat(out.getvalue(), DocTestMatches("""\
|
|
|
76ff05 |
-unittest2.loader._FailedTest.runexample
|
|
|
76ff05 |
+unittest.loader._FailedTest.runexample
|
|
|
76ff05 |
Failed to import test module: runexample
|
|
|
76ff05 |
Traceback (most recent call last):
|
|
|
76ff05 |
File ".../loader.py", line ..., in _find_test_path
|
|
|
76ff05 |
@@ -345,7 +345,7 @@
|
|
|
76ff05 |
pkg = self.useFixture(SampleLoadTestsPackage())
|
|
|
76ff05 |
out = StringIO()
|
|
|
76ff05 |
# XXX: http://bugs.python.org/issue22811
|
|
|
76ff05 |
- unittest2.defaultTestLoader._top_level_dir = None
|
|
|
76ff05 |
+ unittest.defaultTestLoader._top_level_dir = None
|
|
|
76ff05 |
self.assertEqual(None, run.main(
|
|
|
76ff05 |
['prog', 'discover', '-l', pkg.package.base], out))
|
|
|
76ff05 |
self.assertEqual(dedent("""\
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/test_testsuite.py testtools-2.4.0/testtools/tests/test_testsuite.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/test_testsuite.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/test_testsuite.py 2020-04-03 17:13:27.006601122 -0700
|
|
|
76ff05 |
@@ -5,7 +5,6 @@
|
|
|
76ff05 |
import doctest
|
|
|
76ff05 |
from pprint import pformat
|
|
|
76ff05 |
import unittest
|
|
|
76ff05 |
-import unittest2
|
|
|
76ff05 |
|
|
|
76ff05 |
from extras import try_import
|
|
|
76ff05 |
|
|
|
76ff05 |
@@ -223,9 +222,9 @@
|
|
|
76ff05 |
raise cls.skipException('foo')
|
|
|
76ff05 |
def test_notrun(self):
|
|
|
76ff05 |
pass
|
|
|
76ff05 |
- # Test discovery uses the default suite from unittest2 (unless users
|
|
|
76ff05 |
+ # Test discovery uses the default suite from unittest (unless users
|
|
|
76ff05 |
# deliberately change things, in which case they keep both pieces).
|
|
|
76ff05 |
- suite = unittest2.TestSuite([Skips("test_notrun")])
|
|
|
76ff05 |
+ suite = unittest.TestSuite([Skips("test_notrun")])
|
|
|
76ff05 |
log = []
|
|
|
76ff05 |
result = LoggingResult(log)
|
|
|
76ff05 |
suite.run(result)
|
|
|
76ff05 |
@@ -240,9 +239,9 @@
|
|
|
76ff05 |
super(Simples, cls).setUpClass()
|
|
|
76ff05 |
def test_simple(self):
|
|
|
76ff05 |
pass
|
|
|
76ff05 |
- # Test discovery uses the default suite from unittest2 (unless users
|
|
|
76ff05 |
+ # Test discovery uses the default suite from unittest (unless users
|
|
|
76ff05 |
# deliberately change things, in which case they keep both pieces).
|
|
|
76ff05 |
- suite = unittest2.TestSuite([Simples("test_simple")])
|
|
|
76ff05 |
+ suite = unittest.TestSuite([Simples("test_simple")])
|
|
|
76ff05 |
log = []
|
|
|
76ff05 |
result = LoggingResult(log)
|
|
|
76ff05 |
suite.run(result)
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_deferred.py testtools-2.4.0/testtools/tests/twistedsupport/test_deferred.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_deferred.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_deferred.py 2020-04-03 17:13:45.124428761 -0700
|
|
|
76ff05 |
@@ -52,5 +52,5 @@
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
def test_suite():
|
|
|
76ff05 |
- from unittest2 import TestLoader, TestSuite
|
|
|
76ff05 |
+ from unittest import TestLoader, TestSuite
|
|
|
76ff05 |
return TestLoader().loadTestsFromName(__name__)
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_matchers.py testtools-2.4.0/testtools/tests/twistedsupport/test_matchers.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_matchers.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_matchers.py 2020-04-03 17:13:58.452301968 -0700
|
|
|
76ff05 |
@@ -205,5 +205,5 @@
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
def test_suite():
|
|
|
76ff05 |
- from unittest2 import TestLoader, TestSuite
|
|
|
76ff05 |
+ from unittest import TestLoader, TestSuite
|
|
|
76ff05 |
return TestLoader().loadTestsFromName(__name__)
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_runtest.py testtools-2.4.0/testtools/tests/twistedsupport/test_runtest.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_runtest.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_runtest.py 2020-04-03 17:14:09.153200167 -0700
|
|
|
76ff05 |
@@ -1016,7 +1016,7 @@
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
def test_suite():
|
|
|
76ff05 |
- from unittest2 import TestLoader, TestSuite
|
|
|
76ff05 |
+ from unittest import TestLoader, TestSuite
|
|
|
76ff05 |
return TestLoader().loadTestsFromName(__name__)
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools/testsuite.py testtools-2.4.0/testtools/testsuite.py
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools/testsuite.py 2018-04-04 16:27:14.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools/testsuite.py 2020-04-03 17:02:34.047743583 -0700
|
|
|
76ff05 |
@@ -17,8 +17,6 @@
|
|
|
76ff05 |
import unittest
|
|
|
76ff05 |
|
|
|
76ff05 |
from extras import safe_hasattr, try_imports
|
|
|
76ff05 |
-# This is just to let setup.py work, as testtools is imported in setup.py.
|
|
|
76ff05 |
-unittest2 = try_imports(['unittest2', 'unittest'])
|
|
|
76ff05 |
Queue = try_imports(['Queue.Queue', 'queue.Queue'])
|
|
|
76ff05 |
|
|
|
76ff05 |
import testtools
|
|
|
76ff05 |
@@ -36,7 +34,7 @@
|
|
|
76ff05 |
yield subtest
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
-class ConcurrentTestSuite(unittest2.TestSuite):
|
|
|
76ff05 |
+class ConcurrentTestSuite(unittest.TestSuite):
|
|
|
76ff05 |
"""A TestSuite whose run() calls out to a concurrency strategy."""
|
|
|
76ff05 |
|
|
|
76ff05 |
def __init__(self, suite, make_tests, wrap_result=None):
|
|
|
76ff05 |
@@ -199,7 +197,7 @@
|
|
|
76ff05 |
process_result.stopTestRun()
|
|
|
76ff05 |
|
|
|
76ff05 |
|
|
|
76ff05 |
-class FixtureSuite(unittest2.TestSuite):
|
|
|
76ff05 |
+class FixtureSuite(unittest.TestSuite):
|
|
|
76ff05 |
|
|
|
76ff05 |
def __init__(self, fixture, tests):
|
|
|
76ff05 |
super(FixtureSuite, self).__init__(tests)
|
|
|
76ff05 |
diff -ru testtools-2.4.0-orig/testtools.egg-info/requires.txt testtools-2.4.0/testtools.egg-info/requires.txt
|
|
|
76ff05 |
--- testtools-2.4.0-orig/testtools.egg-info/requires.txt 2020-03-14 07:30:56.000000000 -0700
|
|
|
76ff05 |
+++ testtools-2.4.0/testtools.egg-info/requires.txt 2020-04-03 17:31:06.316513271 -0700
|
|
|
76ff05 |
@@ -3,10 +3,7 @@
|
|
|
76ff05 |
pbr>=0.11
|
|
|
76ff05 |
python-mimeparse
|
|
|
76ff05 |
six>=1.4.0
|
|
|
76ff05 |
-traceback2
|
|
|
76ff05 |
-unittest2>=1.0.0
|
|
|
76ff05 |
|
|
|
76ff05 |
[test]
|
|
|
76ff05 |
testresources
|
|
|
76ff05 |
testscenarios
|
|
|
76ff05 |
-unittest2>=1.1.0
|