summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30845: Enhance test_concurrent_futures cleanup (#2564) (#2880)Victor Stinner2017-07-261-1/+2
| | | | | | | | | | | | * bpo-30845: reap_children() now logs warnings * bpo-30845: Enhance test_concurrent_futures cleanup In setUp() and tearDown() methods of test_concurrent_futures tests, make sure that tests don't leak threads nor processes. Clear explicitly the reference to the executor to make it that it's destroyed (to prevent "dangling threads" warning). (cherry picked from commit 3df9dec425b0254df1cdf41922fd8d6b08bf47e4)
* [3.6] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2441)Victor Stinner2017-06-271-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-30523: regrtest --list-cases --match (#2401) * regrtest --list-cases now supports --match and --match-file options. Example: ./python -m test --list-cases -m FileTests test_os * --list-cases now also sets support.verbose to False to prevent messages to stdout when loading test modules. * Add support._match_test() private function. (cherry picked from commit ace56d583664f855d89d1219ece7c21c2fddcf30) * bpo-30764: regrtest: add --fail-env-changed option (#2402) * bpo-30764: regrtest: change exit code on failure * Exit code 2 if failed tests ("bad") * Exit code 3 if interrupted * bpo-30764: regrtest: add --fail-env-changed option If the option is set, mark a test as failed if it alters the environment, for example if it creates a file without removing it. (cherry picked from commit 63f54c68936d648c70ca411661e4208329edcf26) * bpo-30776: reduce regrtest -R false positives (#2422) * Change the regrtest --huntrleaks checker to decide if a test file leaks or not. Require that each run leaks at least 1 reference. * Warmup runs are now completely ignored: ignored in the checker test and not used anymore to compute the sum. * Add an unit test for a reference leak. Example of reference differences previously considered a failure (leak) and now considered as success (success, no leak): [3, 0, 0] [0, 1, 0] [8, -8, 1] (cherry picked from commit 48b5c422ffb03affb00c184b9a99e5537be92732)
* Synchronize libregrtest from master to 3.6 (#2244)Victor Stinner2017-06-161-2/+8
| | | | | | | * bpo-30523: regrtest: Add --list-cases option (#2238) * bpo-30284: Fix regrtest for out of tree build (#1481) * bpo-30540: regrtest: add --matchfile option (#1909) * bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479) * bpo-30263: regrtest: log system load (#1452)
* [3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in ↵Serhiy Storchaka2017-04-281-4/+12
| | | | | | | | | | | test.support. (GH-1341) (#1345) They now work when delete replaced attribute or item inside the with statement. The old value of the attribute or item (or None if it doesn't exist) now will be assigned to the target of the "as" clause, if there is one. (cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)
* bpo-30125: disable faulthandler in ctypes test_SEH (#1237) (#1343)Victor Stinner2017-04-281-0/+16
| | | | | | | | | Disable faulthandler to run test_SEH() of test_ctypes to prevent the following log with a traceback: Windows fatal exception: access violation Add support.disable_faulthandler() context manager. (cherry picked from commit a36e939aeb3b5a2c56561eb24f0e339eee9f3f9d)
* bpo-30107: Make SuppressCrashReport quiet on macOS (#1279) (#1335)Victor Stinner2017-04-281-4/+9
| | | | | | | | | | On macOS, SuppressCrashReport now redirects /usr/bin/defaults command stderr into a pipe to not pollute stderr. It fixes a test_io.test_daemon_threads_shutdown_stderr_deadlock() failure when the CrashReporter domain doesn't exists. Message logged into stderr: 2017-04-24 16:57:21.432 defaults[41046:2462851] The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist (cherry picked from commit d819ad9832292d854e9710493ecdf959b69802e3)
* Issue #28683: Fix the tests that bind() a unix socket and raise PermissionErrorXavier de Gaye2016-12-141-0/+10
| | | | on Android for a non-root user.
* Issue #28759: Fix the tests that fail with PermissionError when run asXavier de Gaye2016-12-131-1/+2
| | | | a non-root user on Android where access rights are controled by SELinux MAC.
* Issue #28512: Fixed setting the offset attribute of SyntaxError bySerhiy Storchaka2016-12-111-3/+10
|\ | | | | | | PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
| * Issue #28512: Fixed setting the offset attribute of SyntaxError bySerhiy Storchaka2016-12-111-3/+10
| | | | | | | | PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
* | Issue #26939: Add the support.setswitchinterval() function to fixXavier de Gaye2016-12-081-0/+16
| | | | | | | | test_functools hanging on the Android armv7 qemu emulator.
* | Issue #28847: dbm.dumb now supports reading read-only files and no longerSerhiy Storchaka2016-12-071-2/+2
|\ \ | |/ | | | | writes the index file when it is not changed.
| * Issue #28847: dbm.dumb now supports reading read-only files and no longerSerhiy Storchaka2016-12-071-3/+3
| | | | | | | | writes the index file when it is not changed.
* | Issue #28666: Fix removing readonly directories on Windows.Serhiy Storchaka2016-11-201-1/+1
|\ \ | |/
| * Issue #28666: Fix removing readonly directories on Windows.Serhiy Storchaka2016-11-201-1/+1
| |
* | Issue #28666: Now test.support.rmtree is able to remove unwritable orSerhiy Storchaka2016-11-201-15/+16
|\ \ | |/ | | | | unreadable directories on Windows too.
| * Issue #28666: Now test.support.rmtree is able to remove unwritable orSerhiy Storchaka2016-11-201-15/+16
| | | | | | | | unreadable directories on Windows too.
* | Issue #28666: Now test.support.rmtree is able to remove unwritable orSerhiy Storchaka2016-11-201-1/+31
|\ \ | |/ | | | | unreadable directories.
| * Issue #28666: Now test.support.rmtree is able to remove unwritable orSerhiy Storchaka2016-11-201-1/+31
| | | | | | | | unreadable directories.
* | Issue 26931: Skip the test_distutils tests using a compiler executableXavier de Gaye2016-11-171-1/+26
| | | | | | | | that is not found
* | Issue 28668: Merge 3.5Xavier de Gaye2016-11-151-1/+17
|\ \ | |/
| * Issue 28668: Skip tests where instanciation of multiprocessing.QueueXavier de Gaye2016-11-151-0/+17
| | | | | | | | would raise ImportError
* | Issue #26934: Handle _ANDROID_API_LEVEL is None on WindowsXavier de Gaye2016-11-131-1/+1
| |
* | Fix test_faulthandler on Android where raise() exits with 0Xavier de Gaye2016-11-131-2/+10
| |
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Adds test.support.PGO and skips tests that are not useful for PGO.Steve Dower2016-09-071-1/+5
| |
* | Issue #27355: Removed support for Windows CE. It was never finished,Larry Hastings2016-09-051-1/+1
| | | | | | | | and Windows CE is no longer a relevant platform for Python.
* | Merge with 3.5Terry Jan Reedy2016-09-051-2/+3
|\ \ | |/
| * Issue #27918# test.resource.is_gui_available no longer flashes tk window.Terry Jan Reedy2016-09-051-2/+3
| | | | | | | | Also, don't run it if 'gui' is not requested. Patch by Xiang Zhang.
* | Issue #27472: Add test.support.unix_shell as the path to the default shell.Xavier de Gaye2016-07-221-1/+6
| |
* | Issue #27027: Added test.support.is_android that is True when this is anXavier de Gaye2016-07-101-1/+3
| | | | | | | | Android build.
* | Issue #19527: Fixed tests with defined COUNT_ALLOCS.Serhiy Storchaka2016-07-031-0/+3
|\ \ | |/
| * Issue #19527: Fixed tests with defined COUNT_ALLOCS.Serhiy Storchaka2016-07-031-0/+3
| |
* | Issue #27289: Merge from 3.5Berker Peksag2016-06-121-1/+2
|\ \ | |/
| * Issue #27289: Prevent test_urllib2net failures due to EOFError raised by ftplibBerker Peksag2016-06-121-1/+2
| |
* | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+19
|\ \ | |/ | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
| * Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+19
| | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | support.temp_dir(): call support.rmtree() instead of shutil.rmtree()Victor Stinner2016-03-241-1/+1
| |
* | Issue #26325: Added test.support.check_no_resource_warning() to check thatSerhiy Storchaka2016-02-111-1/+23
|\ \ | |/ | | | | no ResourceWarning is emitted.
| * Issue #26325: Added test.support.check_no_resource_warning() to check thatSerhiy Storchaka2016-02-111-1/+23
| | | | | | | | no ResourceWarning is emitted.
* | subprocess._optim_args_from_interpreter_flags()Victor Stinner2016-01-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Issue #26100: * Add subprocess._optim_args_from_interpreter_flags() * Add test.support.optim_args_from_interpreter_flags() * Use new functions in distutils, test_cmd_line_script, test_compileall and test_inspect The change enables test_details() test of test_inspect when -O or -OO command line option is used.
* | Issue #25626: Merge zlib fix from 3.5Martin Panter2015-11-211-6/+9
|\ \ | |/
| * Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAXMartin Panter2015-11-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying zlib library stores sizes in “unsigned int”. The corresponding Python parameters are all sizes of buffers filled in by zlib, so it is okay to reduce higher values to the UINT_MAX internal cap. OverflowError is still raised for sizes that do not fit in Py_ssize_t. Sizes are now limited to Py_ssize_t rather than unsigned long, because Python byte strings cannot be larger than Py_ssize_t. Previously this could result in a SystemError on 32-bit platforms. This resolves a regression in the gzip module when reading more than UINT_MAX or LONG_MAX bytes in one call, introduced by revision 62723172412c.
* | Issue #23883: Add test.support.check__all__() and test gettext.__all__Martin Panter2015-11-141-0/+61
|/ | | | Patches by Jacek Kołodziej.
* Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-021-1/+1
|\
| * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-1/+1
| | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | issue9859: Document test.support.detect_api_mismatch() and simplify its test.Gregory P. Smith2015-04-141-1/+1
| |
* | issue9859: Adds a test.support.detect_api_mismatch function useful toGregory P. Smith2015-04-141-1/+16
| | | | | | | | compare the public APIs of two modules or classes.
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-12/+8
| | | | | | | | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* | Skip nntplib tests when transient errors captured.Berker Peksag2015-04-081-0/+5
|\ \ | |/