Message180815
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. |
|
Date |
User |
Action |
Args |
2013-01-28 00:50:13 | ezio.melotti | set | recipients:
+ ezio.melotti, brett.cannon, pitrou, Arfrever, eli.bendersky, eric.snow |
2013-01-28 00:50:13 | ezio.melotti | set | messageid: <1359334213.94.0.784320444688.issue17037@psf.upfronthosting.co.za> |
2013-01-28 00:50:13 | ezio.melotti | link | issue17037 messages |
2013-01-28 00:50:13 | ezio.melotti | create | |
|