| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
Access to mkfifo(), mknod() and hard link creation is controled
by SELinux on Android.
Also remove test.support.android_not_root.
|
| |
|
|
|
|
|
| |
test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.
|
|
|
|
|
|
| |
* Trivial cleanups following bpo-31370
* Also cleanup the "importlib._bootstrap_external" module
|
|
|
|
| |
join_thread() joins a thread but raises an AssertionError if the
thread is still alive after timeout seconds.
|
|
|
|
| |
Use _thread.count() to wait until threads exit. The new context
manager prevents the "dangling thread" warning.
|
|
|
|
|
|
| |
support.threading_cleanup() waits for 1 second before emitting a
warning if there are threads running in the background. With this
change, it now emits the warning immediately, to be able to catch
bugs more easily.
|
|
|
|
|
|
|
|
|
|
| |
test.support.HOST should be "localhost" as it was in the past. See the bpo-29639.
Tests that need the IP address should use HOSTv4 (added) or the existing HOSTv6 constant.
This changes the definition and fixes tests that needed updating to deal with HOST being
the hostname rather than the hardcoded IP address.
This is only the first step in addressing https://bugs.python.org/issue29639.
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
|
|
|
| |
* reap_children() now sets environment_altered to True to detect bugs
using python3 -m test --fail-env-changed
* Replace bare "except:" with "except OSError:" in reap_children()
* Write an unit test for reap_children() using a timeout of 60
seconds
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31009: Fix support.fd_count() on Windows
On Windows, test.support.fd_count() now calls
msvcrt.CrtSetReportMode() to not kill the process nor log any error
on stderr on os.dup(fd) if the file descriptor is invalid.
* Fix for release mode
|
|
|
|
|
|
|
|
|
|
| |
method (#2813)
* bpo-26732: fix too many fds in processes started with the "forkserver" method
A child process would inherit as many fds as the number of still-running children.
* Add blurb and test comment
|
|
|
|
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
|
|
| |
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 --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.
|
|
|
|
|
|
|
|
|
|
| |
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a new option taking a filename to get a list of test names to
filter tests.
* support.match_tests becomes a list.
* Modify run_unittest() to accept to match the whole test identifier,
not just a part of a test identifier.
For example, the following command only runs test_default_timeout()
of the BarrierTests class of test_threading:
$ ./python -m test -v test_threading -m test.test_threading.BarrierTests.test_default_timeout
Remove also some empty lines from test_regrtest.py to make flake8
tool happy.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#1341)
* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.
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.
* Update docstrings.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The @reap_threads decorator and the threading_cleanup() function of
test.support now log a warning if they fail to clenaup threads.
Fix also the usage of support.threading_cleanup() in
test_urllib2_localnet.
The log may help to debug such other warning seen on the AMD64
FreeBSD CURRENT Non-Debug 3.x buildbot:
Warning -- threading._dangling was modified by test_logging
|
| |
|
|
|
|
|
| |
Serhiy Storshaka pointed me that str(path) can emit a BytesWarning: use
repr(path) instead.
|
| |
|
|
|
|
| |
Log the OSError exception message.
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Windows requires at least the SYSTEMROOT environment variable to start Python.
If run_python_until_end() doesn't copy SYSTEMROOT, the function always fail on
Windows.
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
on Android for a non-root user.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
a non-root user on Android where access rights are controled by SELinux MAC.
|
|\ \ \
| |/ /
| | |
| | | |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
|
| |\ \
| | |/
| | |
| | | |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
|
| | |
| | |
| | |
| | | |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
test_functools hanging on the Android armv7 qemu emulator.
|
|\ \ \
| |/ /
| | |
| | | |
writes the index file when it is not changed.
|
| |\ \
| | |/
| | |
| | | |
writes the index file when it is not changed.
|
| | |
| | |
| | |
| | | |
writes the index file when it is not changed.
|
| |\ \
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue #28740: Add sys.getandroidapilevel(): return the build time
API version of Android as an integer.
Function only available on Android.
|
|/ / |
|
|\ \
| |/
| |
| | |
unreadable directories on Windows too.
|
| |
| |
| |
| | |
unreadable directories on Windows too.
|
|\ \
| |/
| |
| | |
unreadable directories.
|
| |
| |
| |
| | |
unreadable directories.
|