1 This is probably more workaround than an actual fix for the test failure.
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
9 package1.test_module.TestClass.test_class ... ok
10 package1.test_module.test_function ... ok
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
16 package2f.test_module.test_function ... ok
18 >>> argv = [__file__, '-v', os.path.join(support, 'package2c')]
19 >>> run(argv=argv) # doctest: +REPORT_NDIFF
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
25 ----------------------------------------------------------------------
28 >>> run(argv=argv) # doctest: +REPORT_NDIFF
30 - test (package2c.test_module.TestCase) ... ok
31 + test (package2c.test_module.transplant_class.<locals>.C) ... ok
33 ----------------------------------------------------------------------
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
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
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'])
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'])
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'])