STINNER Victor added the comment: I backported test_regrtest from master to 2.7. I removed:
* ParseArgsTestCase: regrtest.py of 2.7 has no API to easily write unit tests for argument parsing * test_huntrleaks_fd_leak(): this features doesn't exist in regrtest 2.7 * test_coverage(): regrtest 2.7 argument parser doesn't support --coverage, moreover this is an issue with the test summary * check_executed_tests() doesn't check the final list "Tests results: xxx" since it doesn't exist in Python 2.7 * test_list_tests(): --list-tests feature doesn't exist in 2.7 * test_fromlist() only supports the most basic format: "test_xxx" * test_slowest_interrupted(): the test failed and I was too lazy to try to fix it, this test is fragile * test_wait(): no --wait feature in 2.7 I made minor changes (ex: super()) to port the code from Python 3.7 to 2.7. I removed code using faulthandler, since faulthandler doesn't exist in 2.7. test_slowest() was renamed to test_slow(), since regrtest 2.7 has the cmdline option --slow, not --slowest. I will try to fix test_coverage() later, after test_regrtest is added to 2.7. test_crashed() uses "import ctypes; ctypes.string_at(0)" instead of "import faulthandler; faulthandler._sigsegv()", I hope that ctypes.string_at(0) is enough to crash on all platforms :-D Otherwise, I may add something to _testcapi. I may try to backport/fix other issues later to fix other removed tests. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30283> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com