summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/save_env.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36725: regrtest: add TestResult type (GH-12960)Victor Stinner2019-04-261-2/+2
| | | | | | | | | | | | | | | * Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-021-0/+7
| | | | tests (GH-7328)
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-8/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* threading_cleanup() failure marks test as ENV_CHANGED (#2500)Victor Stinner2017-06-301-1/+7
| | | | | | | If threading_cleanup() fails to cleanup threads, set a a new support.environment_altered flag to true, flag uses by save_env which is used by regrtest to check if a test altered the environment. At the end, the test file fails with ENV_CHANGED instead of SUCCESS, to report that it altered the environment.
* regrtest: always show before/after of modified env (#1192)Victor Stinner2017-04-191-3/+2
| | | | | | | | Buildbots don't run tests with -vv and so only log "xxx was modified by test_xxx" which is not enough to debug such random issue. In many cases, I'm unable to reproduce the warning and so unable to fix it. Always logging the value before and value after should help to debug such warning on buildbots.
* Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵Eric V. Smith2016-09-101-1/+1
| | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces.
* Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a ↵Eric V. Smith2016-09-031-1/+1
| | | | temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
* Issue #27829: libregrtest.save_env: flush stderrVictor Stinner2016-08-221-6/+4
| | | | | | Use flush=True to try to get a warning which is missing in buildbots. Use also f-string to make the code shorter.
* Issue #27787: Merge regrtest fixup from 3.5Martin Panter2016-08-201-0/+1
|
* Merge 3.5 (regrtest)Victor Stinner2016-03-291-0/+1
|
* Backed out changeset 245a16f33c4bVictor Stinner2016-03-251-279/+202
| | | | Serhiy asked me to review it.
* Rework libregrtest.save_envVictor Stinner2016-03-251-202/+279
| | | | | | | | | | | * Replace get/restore methods with a Resource class and Resource subclasses * Create ModuleAttr, ModuleAttrList and ModuleAttrDict helper classes * Use __subclasses__() to get resource classes instead of using an hardcoded list (2 shutil resources were missinged in the list!) * Don't define MultiprocessingProcessDangling resource if the multiprocessing module is missing * Nicer diff for dictionaries. Useful for the big os.environ dict * Reorder code to group resources
* Merge from 3.5 for issue #25188.Brett Cannon2015-10-021-2/+3
|
* Issue #25220: Move most regrtest.py code to libregrtestVictor Stinner2015-09-261-0/+284