Ezio Melotti added the comment: Some of the exceptions among the modules you listed are:
Lib/test/test_warnings.py:420 has a class specific for the C module. Lib/test/json_tests/test_dump.py:34 has an additional test specific for the C module. Lib/test/json_tests/test_speedups.py is specific for the C module. Lib/test/test_functools.py:199 is specific to the Python module. Lib/test/test_functools.py:207 different tests depending on the version. Unless these additional methods are defined separately and somehow added to the two classes returned by pep399_tests.create_test_cases(ExampleTest), it would be necessary to create additional classes using the current idiom and then get the modules from pep399_tests.cmodule/pep399_tests.pycmodule, e.g.: # the two "normal" tests TestPyDump, TestCDump = pep399_tests.create_test_cases(DumpTest) # the additional test for the C module @unittest.skipUnless(pep399_tests.cmodule, 'requires _json') class TestCDump2(unittest.TestCase) module = pep399_tests.cmodule @bigmemtest(size=_1G, memuse=1) def test_large_list(self, size): ... FWIW I won't change the json tests, because I already wrote them in a way that most of the code is defined in __init__.py and shared in all the other test files. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17037> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com