summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_test_support.py
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)Anselm Kruis2018-02-231-0/+30
| | | | | | | Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from. If a forked child exits the context manager it won't do the cleanup.. (cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad) Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
* bpo-31324: Optimize support._match_test() (#4523) (#4524)Victor Stinner2017-11-231-0/+58
| | | | | | | | | | | | | | | | | | | * bpo-31324: Optimize support._match_test() (#4421) * Rename support._match_test() to support.match_test(): make it public * Remove support.match_tests global variable. It is replaced with a new support.set_match_tests() function, so match_test() doesn't have to check each time if patterns were modified. * Rewrite match_test(): use different code paths depending on the kind of patterns for best performances. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 803ddd8ce22f0de3ab42fb98a225a704c000ef06) * bpo-31324: Fix test.support.set_match_tests(None) (#4505) (cherry picked from commit bb11c3c967afaf263e00844d4ab461b7fafd6d36) (cherry picked from commit 70b2f8797146a56a6880743424f0bedf4fc30c62)
* [2.7] bpo-30366: Backport tests for test.support. (#1582)Serhiy Storchaka2017-05-151-0/+366
Also backport new functions temp_dir() and python_is_optimized(). temp_cwd() now accepts None as a name (means using tempfile.mkdtemp). check_syntax_error() now accepts arguments lineno and offset. Use more specific error messages in get_attribute().