]>
Commit | Line | Data |
---|---|---|
cb33cc38 JB |
1 | Disable test_test_protocol2, which depends on testtools own test suite. |
2 | Don't require unittest2 on python 3.5+. | |
3 | Adjust some traceback quirks for (python3 or not unittest2???) | |
4 | ||
5 | --- python-subunit-1.3.0/python/subunit/tests/__init__.py.orig 2018-07-27 17:10:42.361296016 +0200 | |
6 | +++ python-subunit-1.3.0/python/subunit/tests/__init__.py 2018-07-27 17:10:56.404629189 +0200 | |
7 | @@ -40,7 +40,6 @@ | |
8 | test_subunit_tags, | |
9 | test_tap2subunit, | |
10 | test_test_protocol, | |
11 | - test_test_protocol2, | |
12 | test_test_results, | |
13 | ) | |
14 | ||
15 | @@ -53,7 +52,6 @@ | |
16 | result.addTest(loader.loadTestsFromModule(test_progress_model)) | |
17 | result.addTest(loader.loadTestsFromModule(test_test_results)) | |
18 | result.addTest(loader.loadTestsFromModule(test_test_protocol)) | |
19 | - result.addTest(loader.loadTestsFromModule(test_test_protocol2)) | |
20 | result.addTest(loader.loadTestsFromModule(test_tap2subunit)) | |
21 | result.addTest(loader.loadTestsFromModule(test_filter_to_disk)) | |
22 | result.addTest(loader.loadTestsFromModule(test_subunit_filter)) | |
23 | --- python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py.orig 2018-07-27 17:16:40.051291931 +0200 | |
24 | +++ python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py 2018-07-27 17:16:42.897958565 +0200 | |
25 | @@ -16,7 +16,10 @@ | |
26 | ||
27 | import datetime | |
28 | import io | |
29 | -import unittest2 as unittest | |
30 | +try: | |
31 | + import unittest2 as unittest | |
32 | +except ImportError: | |
33 | + import unittest | |
34 | import os | |
35 | import sys | |
36 | import tempfile | |
37 | --- python-subunit-1.3.0/python/subunit/tests/__init__.py.orig 2018-07-27 18:09:57.424588755 +0200 | |
38 | +++ python-subunit-1.3.0/python/subunit/tests/__init__.py 2018-07-29 12:02:31.736200742 +0200 | |
39 | @@ -22,9 +22,10 @@ | |
40 | ||
41 | # Before the test module imports to avoid circularity. | |
42 | # For testing: different pythons have different str() implementations. | |
43 | +tb_prelude = "Traceback (most recent call last):\n" if sys.version_info[0] < 3 else "" | |
44 | _remote_exception_repr = "testtools.testresult.real._StringException" | |
45 | -_remote_exception_str = "Traceback (most recent call last):\ntesttools.testresult.real._StringException" | |
46 | -_remote_exception_str_chunked = "57\r\n" + _remote_exception_str + ": boo qux\n0\r\n" | |
47 | +_remote_exception_str = tb_prelude + "testtools.testresult.real._StringException" | |
48 | +_remote_exception_str_chunked = ("%X" % (42+10+len(tb_prelude)) + "\r\n" + _remote_exception_str + ": boo qux\n0\r\n" | |
49 | ||
50 | ||
51 | from subunit.tests import ( | |
52 | --- python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py.orig 2018-07-29 12:02:58.076200443 +0200 | |
53 | +++ python-subunit-1.3.0/python/subunit/tests/test_test_protocol.py 2018-07-29 12:03:04.769533698 +0200 | |
54 | @@ -51,7 +51,7 @@ | |
55 | import subunit.iso8601 as iso8601 | |
56 | ||
57 | ||
58 | -tb_prelude = "Traceback (most recent call last):\n" | |
59 | +from subunit.tests import tb_prelude # tb_prelude = "Traceback (most recent call last):\n" if sys.version_info[0] < 3 else "" | |
60 | ||
61 | ||
62 | def details_to_str(details): |