python/elasticsearch: update to 8.16.0
[oi-userland.git] / components / python / nose / patches / 03-test-locals.patch
blobd9433a2ce290a1340aa4dcf3bc195d29c41bab33
1 This is probably more workaround than an actual fix for the test failure.
3 See also:
4 https://stackoverflow.com/questions/45714276/transplant-class-locals-c-error-in-python
6 --- nose-1.3.7/functional_tests/doc_tests/test_issue145/imported_tests.rst.orig
7 +++ nose-1.3.7/functional_tests/doc_tests/test_issue145/imported_tests.rst
8 @@ -46,7 +46,7 @@
9 package1.test_module.TestClass.test_class ... ok
10 package1.test_module.test_function ... ok
11 package2c setup
12 - test (package2c.test_module.TestCase) ... ok
13 + test (package2c.test_module.transplant_class.<locals>.C) ... ok
14 package2c.test_module.TestClass.test_class ... ok
15 package2f setup
16 package2f.test_module.test_function ... ok
17 @@ -71,7 +71,7 @@
18 >>> argv = [__file__, '-v', os.path.join(support, 'package2c')]
19 >>> run(argv=argv) # doctest: +REPORT_NDIFF
20 package2c setup
21 - test (package2c.test_module.TestCase) ... ok
22 + test (package2c.test_module.transplant_class.<locals>.C) ... ok
23 package2c.test_module.TestClass.test_class ... ok
24 <BLANKLINE>
25 ----------------------------------------------------------------------
26 @@ -98,7 +98,7 @@
27 ... ':TestCase.test']
28 >>> run(argv=argv) # doctest: +REPORT_NDIFF
29 package2c setup
30 - test (package2c.test_module.TestCase) ... ok
31 + test (package2c.test_module.transplant_class.<locals>.C) ... ok
32 <BLANKLINE>
33 ----------------------------------------------------------------------
34 Ran 1 test in ...s
35 --- nose-1.3.7/functional_tests/test_load_tests_from_test_case.py.orig
36 +++ nose-1.3.7/functional_tests/test_load_tests_from_test_case.py
37 @@ -44,7 +44,7 @@
39 def runTest(self):
40 expect = [
41 - 'test_value (%s.Derived) ... ERROR' % __name__,
42 + 'test_value (%s.NoFixturePlug.loadTestsFromTestCase.<locals>.Derived) ... ERROR' % __name__,
43 'test_value (tests.Tests) ... ok']
44 print str(self.output)
45 for line in self.output:
46 --- nose-1.3.7/unit_tests/test_xunit.py.orig
47 +++ nose-1.3.7/unit_tests/test_xunit.py
48 @@ -123,7 +123,7 @@
49 eq_(tree.attrib['skip'], "0")
51 tc = tree.find("testcase")
52 - eq_(tc.attrib['classname'], "test_xunit.TC")
53 + eq_(tc.attrib['classname'], "test_xunit.mktest.<locals>.TC")
54 eq_(tc.attrib['name'], "runTest")
55 assert time_taken.match(tc.attrib['time']), (
56 'Expected decimal time: %s' % tc.attrib['time'])
57 @@ -190,7 +190,7 @@
58 eq_(tree.attrib['skip'], "0")
60 tc = tree.find("testcase")
61 - eq_(tc.attrib['classname'], "test_xunit.TC")
62 + eq_(tc.attrib['classname'], "test_xunit.mktest.<locals>.TC")
63 eq_(tc.attrib['name'], "runTest")
64 assert time_taken.match(tc.attrib['time']), (
65 'Expected decimal time: %s' % tc.attrib['time'])
66 @@ -279,7 +279,7 @@
67 eq_(tree.attrib['skip'], "0")
69 tc = tree.find("testcase")
70 - eq_(tc.attrib['classname'], "test_xunit.TC")
71 + eq_(tc.attrib['classname'], "test_xunit.mktest.<locals>.TC")
72 eq_(tc.attrib['name'], "runTest")
73 assert time_taken.match(tc.attrib['time']), (
74 'Expected decimal time: %s' % tc.attrib['time'])