| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* Use @support.reap_threads on unit tests creating threads
* Call TestCase.fail() on thread.join(timeout) failure
|
|
|
|
|
|
|
| |
At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
|
|
|
|
| |
collections. (#1263)
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30125: Cleanup faulthandler.c
* Use size_t type for iterators
* Add { ... }
* bpo-30125: Fix faulthandler.disable() on Windows
On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_io has two unit tests which trigger a deadlock:
* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()
These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:
Warning -- files was modified by test_io
Before: []
After: ['python.core']
|
|
|
|
|
|
|
|
|
|
| |
test_quick_connect() runs a thread up to 50 seconds, whereas the
socket is connected in 0.2 second and then the thread is expected to
end in less than 3 second. On Linux, the thread ends quickly because
select() seems to always return quickly. On FreeBSD, sometimes
select() fails with timeout and so the thread runs much longer than
expected.
Fix the thread timeout to fix a race condition in the test.
|
|
|
|
| |
when pass arguments of wrong type.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Add setUpModule() and tearDownModule() functions to test_site to
save/restore sys.path at the module level to prevent warning if the
user site directory is created, since site.addsitedir() modifies
sys.path.
|
| |
|
|
|
| |
Skip the file if it has bad encoding.
|
|
|
|
|
|
|
|
|
| |
Call asyncore.close_all() with ignore_all=True in the tearDown()
method of the test_asyncore base test case. It should prevent keeping
alive sockets in asyncore.socket_map if close() fails with an
unexpected error.
Revert also an unwanted change of my previous commit: remove name
parameter of Thread in test_quick_connect().
|
|
|
|
| |
Skip test_normalization.test_main() if download raises a permission
error.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use addCleanup() in test_quick_connect() because it keeps the
Thread object alive and so @reap_threads fails on its timeout of 1
second. "./python -m test -v test_asyncore -m test_quick_connect"
now takes 185 ms, instead of 11 seconds.
Other minor changes:
* Use "with sock:" to close the socket instead of
try/finally: sock.close()
* Use self.skipTest() in test_quick_connect() to remove one
indentation level and notice user that the test is specific to
AF_INET and AF_INET6
|
|
|
|
| |
Revert f50354adaaafebe95ad09d09b825804a686ea843: it introduced a
regression in test_threadedtempfile.
|
| |
|
|
|
|
| |
(#1131)
|
|
|
|
|
|
|
| |
and (#1153)
instruction offsets.
Add tests for widths of opcode names.
|
|
|
|
|
|
| |
raised an error.
Replace them with using concrete types API that never fails if appropriate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29514: Check magic number for micro release
Add a dict importlib.util.EXPECTED_MAGIC_NUMBERS which
details the initial and expected pyc magic number for
each minor release. This gives a mechanism for users to
check if the magic number has changed within a release and
for a test to ensure procedure is followed if a change is
necessary.
Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.
* Simplify magic number release test
Simplify the magic number release test by removing
EXPECTED_MAGIC_NUMBERS table and making the expected
magic number self-contained within the test.
BPO: 29514
* Improve magic number test execution and message
Improve the execution of the magic number test by
using skipUnless for alpha and beta releases, and
directly inheriting from unittest.TestCase rather than
using the machinery for the other tests. Also improve
the error message to explain the reason for caution in
changing the magic number.
BPO: 29514
|
| |
|
|
|
|
| |
(#1000)
|
|
|
|
| |
values. (#701)
|
|
|
|
| |
present (#1130)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(#1041)
multiple times. Writing to closed zip entry writer object now always produce
a ValueError.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-949)
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.
Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
|
|
|
|
|
|
|
| |
`PyArg_ParseTuple*` (#916)
Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.
|
|
|
| |
attributes.
|
|
|
|
| |
object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement math.remainder.
* Fix markup for arguments; use double spaces after period.
* Mark up function reference in what's new entry.
* Add comment explaining the calculation in the final branch.
* Fix out-of-order entry in whatsnew.
* Add comment explaining why it's good enough to compare m with c, in spite of possible rounding error.
|
|
|
| |
* correct parse_qs and parse_qsl test case descriptions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29972: Fix test_eintr on AIX
On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects
200 ms or longer.
* bpo-29972: Skip some inet_pton() tests on AIX
Skip some inet_pton() tests of test_socket on AIX.
inet_pton() on AIX is less strict than on Linux and doesn't reject
some invalid IP addresses. The unit tests test more the libc than
Python itself.
* bpo-29972: Skip tests known to fail on AIX
* test_locale.test_strcoll_with_diacritic()
* test_locale.test_strxfrm_with_diacritic()
* test_strptime.test_week_of_year_and_day_of_week_calculation()
* test_tools.test_POT_Creation_Date()
|
|
|
|
|
| |
Don't fail anymore if test run with python3 -Werror.
Fix also deprecation message: add a space.
|
|
|
|
| |
Return 304 response if file was not modified.
|
| |
|
|
|
| |
This reverts commit b94d7fd4efa877d649cea9c8125c8869ffe0c32d.
|
|
|
|
|
|
|
|
| |
the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie
add more ip_interface comparison tests
|
|
|
| |
Also uncomment and fix a path test.
|