| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.
|
|
|
|
|
|
|
| |
ignore (GH-16989)
When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored.
For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.
|
|
|
|
|
|
|
|
| |
Add timeout constants to test.support:
* LOOPBACK_TIMEOUT
* INTERNET_TIMEOUT
* SHORT_TIMEOUT
* LONG_TIMEOUT
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_hmac and test_hashlib test built-in hashing implementations and
OpenSSL-based hashing implementations. Add more checks to skip OpenSSL
implementations when a strict crypto policy is active.
Use EVP_DigestInit_ex() instead of EVP_DigestInit() to initialize the
EVP context. The EVP_DigestInit() function clears alls flags and breaks
usedforsecurity flag again.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38270
|
|
|
|
|
|
|
|
|
|
|
| |
Make it easier to run and test Python on systems with restrict crypto policies:
* add requires_hashdigest to test.support to check if a hash digest algorithm is available and working
* avoid MD5 in test_hmac
* replace MD5 with SHA256 in test_tarfile
* mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5
https://bugs.python.org/issue38270
|
|
|
|
|
| |
test.support.bytecode_helper (GH-15168)
Rename and document test.bytecode_helper as test.support.bytecode_helper
|
|
|
|
|
| |
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.
|
| |
|
|
|
|
|
| |
The collection's item is now always at the left and
the needle is on the right of ==.
|
|
|
|
|
|
|
|
|
| |
(GH-14996)
There was a discrepancy between the Python and C implementations.
Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
|
|
|
|
|
| |
Mark some individual tests to skip when --pgo is used. The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.
|
| |
|
|
|
|
|
| |
17763.615 (#14460)
A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.
|
|
|
|
| |
Context manager catching threading.Thread exception using
threading.excepthook.
|
| |
|
| |
|
|
|
|
|
|
|
| |
container (GH-14428)
sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
|
|
|
|
| |
(GH-13454)
|
|
|
|
|
|
|
|
|
|
|
| |
Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.
Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.
Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
|
|
|
|
|
| |
The __exit__() method of test.support.catch_unraisable_exception
context manager now ignores unraisable exception raised when clearing
self.unraisable attribute.
|
| |
|
|
|
|
| |
catch_unraisable_exception() now also removes its 'unraisable'
attribute at the context manager exit.
|
|
|
|
|
|
| |
* Copy test_exceptions.test_unraisable() to
test_sys.UnraisableHookTest().
* Use catch_unraisable_exception() in test_coroutines,
test_exceptions, test_generators.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release build and debug build are now ABI compatible: the Py_DEBUG
define no longer implies Py_TRACE_REFS define which introduces the
only ABI incompatibility.
A new "./configure --with-trace-refs" build option is now required to
get Py_TRACE_REFS define which adds sys.getobjects() function and
PYTHONDUMPREFS environment variable.
Changes:
* Add ./configure --with-trace-refs
* Py_DEBUG no longer implies Py_TRACE_REFS
|
|
|
|
| |
Fix test_imap4_host_default_value() of test_imaplib: catch also
errno.ENETUNREACH error.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It checks that a SyntaxWarning is raised when compile specified
statement, that it is raised only once, that it is converted to
a SyntaxError when raised as exception, and that both warning and
exception objects have corresponding attributes.
|
|
|
| |
Add tooling that will useful in future updates, paying particular attention to difficult cases where only the upper bits on the input vary.
|
|
|
| |
Add a deprecated warning for the threading.Thread.isAlive() method.
|
|
|
|
|
|
| |
Depending on system config, a missing candidate compiler name may be
reported as the empty string rather than as None, so adjust the test
helper accordingly.
|
|
|
|
|
| |
Rename test.bisect module to test.bisect_cmd to avoid conflict with
bisect module when running directly a test like
"./python Lib/test/test_xmlrpc.py".
|
|
|
|
|
|
|
| |
Replace time.time() with time.monotonic() in tests to measure time
delta.
test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
|
|
|
|
|
|
| |
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
|
|
|
|
| |
(GH-7278)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
After commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed, the output of the
test suite is always buffered as the test output needs to be included in
the JUnit file in same cases (as when a test fails). This has the
consequence that printing or using debuggers (like pdb) in the test
suite does not result in a good user experience anymore.
This commit modifies the test suite runner so it only captures the test
output when the JUnit file is requested to fix the regression so prints
and debuggers are usable again.
|
|
|
|
|
|
|
|
|
| |
If buffering=1 is specified for open() in binary mode, it is silently
treated as buffering=-1 (i.e., the default buffer size).
Coupled with the fact that line buffering is always supported in Python 2,
such behavior caused several issues (e.g., bpo-10344, bpo-21332).
Warn that line buffering is not supported if open() is called with
binary mode and buffering=1.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The __getitem__ methods of DOMEventStream, FileInput,
and FileWrapper classes ignore their 'index' parameters
and return the next item instead.
|
|
|
| |
This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.
|
|
|
|
|
|
|
|
| |
* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell
|
|
|
|
|
|
|
|
|
| |
Substract one because listdir() opens internally a file
descriptor to list the content of the /proc/self/fd/ directory.
Add test_support.test_fd_count().
Move also MAXFD code before msvcrt.CrtSetReportMode(), to make sure
that the report mode is always restored on failure.
|
|
|
| |
an => and
|
|
|
|
| |
tests (GH-7328)
|
| |
|