summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-30871: Add test.pythoninfo (#3075)Victor Stinner2017-08-172-3/+407
| | | | | | * Add Lib/test/pythoninfo.py: script collecting various informations about Python to help debugging test failures. * regrtest: remove sys.hash_info and sys.flags from header. * Travis CI, Appveyor: run pythoninfo before tests
* bpo-24700: Add a fast path for comparing array.array of equal type (#3009)Adrian Wielgosik2017-08-171-0/+10
|
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should ↵Antoine Pitrou2017-08-161-0/+26
| | | | | | | | be joined on exit (#3111) * bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit * Add NEWS blurb
* bpo-31069, test_multiprocessing: Fix dangling process (#3103)Victor Stinner2017-08-161-1/+2
| | | | Fix a warning about dangling processes in test_rapid_restart() of _test_multiprocessing: join the process.
* bpo-30714: ALPN changes for OpenSSL 1.1.0f (#2305)Christian Heimes2017-08-151-2/+3
| | | | | | | | | | OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that. The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN callback can pretend to not been set. See https://github.com/openssl/openssl/pull/3158 for more details Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() ↵Коренберг Марк2017-08-141-0/+19
| | | | (#3000) (#3000)
* bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065)Victor Stinner2017-08-101-1/+3
|
* bpo-26762: _test_multiprocessing reports dangling (#3064)Victor Stinner2017-08-101-0/+6
| | | | _test_multiprocessing now marks the test as ENV_CHANGED on dangling process or thread.
* regrtest: count also env changed as failures in progress (#3061)Victor Stinner2017-08-101-2/+3
|
* Enhance support.reap_children() (#3036)Victor Stinner2017-08-102-17/+73
| | | | | | | * 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-31151: Add socketserver.ForkingMixIn.server_close() (#3057)Victor Stinner2017-08-101-4/+5
| | | | | | | | | * Add socketserver.ForkingMixIn.server_close() bpo-31151: socketserver.ForkingMixIn.server_close() now waits until all child processes completed to prevent leaking zombie processes. * Fix test on Windows which doesn't have ForkingMixIn
* bpo-31160: test_tempfile: Fix reap_children() warning (#3056)Victor Stinner2017-08-101-1/+7
| | | | TestRandomNameSequence.test_process_awareness() now calls os.waitpid() to avoid leaking a zombie process.
* bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055)Victor Stinner2017-08-101-35/+22
| | | | | | | | | | | | | The current test_child_terminated_in_stopped_state() function test creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and then crash (SIGSEGV). The problem is that calling os.waitpid() in the parent process is not enough to close the process: the child process remains alive and so the unit test leaks a child process in a strange state. Closing the child process requires non-trivial code, maybe platform specific. Remove the functional test and replaces it with an unit test which mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to test the WIFSTOPPED() path.
* bpo-31160: test_builtin: don't check waitpid() status (#3050)Victor Stinner2017-08-091-2/+2
|
* bpo-31160: Fix test_random for zombie process (#3045)Victor Stinner2017-08-091-1/+7
| | | | TestModule.test_after_fork() now calls os.waitpid() to read the exit status of the child process to avoid creating a zombie process.
* bpo-31160: regrtest now reaps child processes (#3044)Victor Stinner2017-08-091-0/+5
| | | | Add a post_test_cleanup() function which currently only calls support.reap_children().
* bpo-31160: Fix test_builtin for zombie process (#3043)Victor Stinner2017-08-091-0/+4
| | | | | PtyTests.run_child() now calls os.waitpid() to read the exit status of the child process to avoid creating zombie process and leaking processes in the background.
* bpo-31072: Add filter to zipapp (#3021)Jeffrey Rackauckas2017-08-091-0/+17
| | | | | | bpo-31072: Add a filter argument to zipapp.create_archive (GH-3021) * Add an include_file argument to allow callers to decide which files to include * Document the new argument
* bpo-31150: Wait for child process in test_forkinthread to avoid thread ↵Ammar Askar2017-08-091-0/+2
| | | | reaped warnings (#3032)
* bpo-31107: Fix copyreg mangled slot names calculation. (#2989)Shane Harvey2017-08-041-0/+10
|
* bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790)Serhiy Storchaka2017-08-032-1/+8
| | | Previously any exception was replaced with a KeyError exception.
* bpo-31071: Avoid masking original TypeError in call with * unpacking (#2957)Serhiy Storchaka2017-08-031-0/+16
| | | when other arguments are passed.
* Spelling fixes (#2902)Ville Skyttä2017-08-0317-29/+29
|
* bpo-31080: Allowed logging.config.fileConfig() to accept both args and ↵Preston Landers2017-08-021-2/+2
| | | | kwargs. (GH-2979)
* bpo-31061: fix crash in asyncio speedup module (GH-2966)Alexander Mohr2017-08-022-0/+27
|
* bpo-30897: Add is_mount() to pathlib.Path (#2669)Cooper Lees2017-08-011-0/+12
| | | | * Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path) * Add tests for is_mount()
* bpo-31084: QueueHandler now formats messages correctly. (GH-2954)favll2017-08-011-0/+14
|
* Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896)Alexander Belopolsky2017-07-311-9/+18
| | | | | | | | | | | | | | | | | | * Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. * bpo-5288: Implemented %z formatting of sub-minute offsets. * bpo-5288: Removed mentions of the whole minute limitation on TZ offsets. * bpo-5288: Removed one more mention of the whole minute limitation. Thanks @csabella! * Fix a formatting error in the docs * Addressed review comments. Thanks, @haypo.
* bpo-30522: Implemented a method to allow setting a logging.StreamHander's ↵Vinay Sajip2017-07-301-0/+14
| | | | stream. (GH-2921)
* bpo-30962: Added caching to Logger.isEnabledFor() (GH-2752)Avram Lubkin2017-07-301-1/+59
|
* bpo-31027: Fix test_listcomps failure when run directly (#2939)Zackery Spytz2017-07-291-1/+1
| | | Bug appears to be incomplete copy-paste-edit.
* bpo-31066: Fix test_httpservers.test_last_modified() (#2933)Victor Stinner2017-07-281-4/+6
| | | Write the temporary file on disk and then get its modification time.
* bpo-31067: test_subprocess calls reap_children() (#2931)Victor Stinner2017-07-281-0/+2
| | | | test_subprocess now also calls reap_children() in tearDown(), not only on setUp().
* bpo-29585: fix test fail on macOS Framework build (GH-2928)INADA Naoki2017-07-281-1/+5
|
* bpo-28095: Re-enable temporarily disabled part of test_startup_imports on ↵Ned Deily2017-07-281-3/+1
| | | | | | | | macOS (#2927) The changes for bpo-29585 eliminate the extra imports on macOS that caused the original test failure. This reverts commit 8a2150aae6db4d664c96a038ef6abacd4bcbcdc9.
* bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)Victor Stinner2017-07-271-0/+4
| | | | | There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if dev_t is larger than 32-bit, until the bug is fixed in FreeBSD CURRENT.
* bpo-31028: Fix test_pydoc when run directly (#2864)Victor Stinner2017-07-271-1/+1
| | | | | | | | | | * bpo-31028: Fix test_pydoc when run directly Fix get_pydoc_link() of test_pydoc to fix "./python Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent relative directories. * Use realpath() instead of abspath()
* bpo-30188: fix TypeError in test_nntplib (GH-2892)INADA Naoki2017-07-261-2/+2
| | | fixes regression of 5b4feb7
* bpo-31043: fixed test_datetime run twice. (GH-2891)Utkarsh Upadhyay2017-07-261-2/+0
|
* bpo-30302 Make timedelta.__repr__ more informative. (#1493)Utkarsh Upadhyay2017-07-252-3/+15
|
* bpo-31034: Reliable signal handler for test_asyncio (#2867)Victor Stinner2017-07-252-31/+45
| | | | | | | | | * bpo-31034: Reliable signal handler for test_asyncio Don't rely on the current SIGHUP signal handler, make sure that it's set to the "default" signal handler: SIG_DFL. * Add comments
* bpo-31009: Fix support.fd_count() on Windows (#2862)Victor Stinner2017-07-252-29/+43
| | | | | | | | | | * 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
* bpo-31029: test_tokenize Add missing import unittest (#2865)Stéphane Wirtel2017-07-251-0/+1
|
* bpo-26762: test_multiprocessing close more queues (#2855)Victor Stinner2017-07-251-3/+15
| | | | | | * Close explicitly queues to make sure that we don't leave dangling threads * test_queue_in_process(): remove unused queue * test_access() joins also the process to fix a random warning
* test_multiprocessing detects dangling per test case (#2841)Victor Stinner2017-07-241-14/+67
| | | | | | | | | | | | | bpo-26762: test_multiprocessing now detects dangling processes and threads per test case classes: * setUpClass()/tearDownClass() of mixin classes now check if multiprocessing.process._dangling or threading._dangling was modified to detect "dangling" processses and threads. * ManagerMixin.tearDownClass() now also emits a warning if it still has more than one active child process after 5 seconds. * tearDownModule() now checks for dangling processes and threads before sleep 500 ms. And it now only sleeps if there is a least one dangling process or thread.
* test_multiprocessing: Fix dangling process/thread (#2850)Victor Stinner2017-07-241-2/+22
| | | | | | | bpo-26762: Fix more dangling processes and threads in test_multiprocessing: * Queue: call close() followed by join_thread() * Process: call join() or self.addCleanup(p.join)
* bpo-30980: Fix double close in asyncore.file_wrapper (#2789)Nir Soffer2017-07-241-1/+4
| | | | | | | | | | | | | | | * bpo-30980: Fix close test to fail test_close_twice was not considering the fact that file_wrapper is duping the file descriptor. Closing the original descriptor left the duped one open, hiding the fact that close protection is not effective. * bpo-30980: Fix double close protection Invalidated self.fd before closing, handling correctly the case when os.close raises. * bpo-30980: Fix fd leak introduced in the fixed test
* bpo-30188: test_nntplib catch also ssl.SSLEOFError (#2843)Victor Stinner2017-07-241-1/+6
| | | | Catch also ssl.SSLEOFError in NetworkedNNTPTests setUpClass(). EOFError was already catched.
* bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)Victor Stinner2017-07-241-2/+4
| | | | | test_level() of _test_multiprocessing._TestLogging now uses regular processes rather than daemon processes to prevent zombi processes (to not "leak" processes).
* bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command ↵Dong-hee Na2017-07-221-1/+5
| | | | (#1214)