summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* bpo-26732: fix too many fds in processes started with the "forkserver" ↵Antoine Pitrou2017-07-223-32/+67
| | | | | | | | | | 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
* Fix test failure without ctypes (#2802)Antoine Pitrou2017-07-211-1/+1
|
* bpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741)Gareth Rees2017-07-211-5/+12
| | | | | | | | | | * bpo-19896: Add typcodes 'q' and 'Q' to multiprocessing.sharedctypes. Patch by Antony Lee. * Add NEWS entry. * Slightly tweak NEWS entry Make it clear this is more of a fix rather than a new feature.
* bpo-30822: Fix testing of datetime module. (#2530) (#2783)Utkarsh Upadhyay2017-07-212-8/+12
| | | Only C implementation was tested.
* bpo-30822: Exclude tzdata from regrtest --all (#2775)Victor Stinner2017-07-203-5/+25
| | | | | | | | | | | | | When running the test suite using --use=all / -u all, exclude tzdata since it makes test_datetime too slow (15-20 min on some buildbots) which then times out on some buildbots. -u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata, to run all test_datetime tests. Fix also regrtest command line parser to allow passing -u extralargefile to run test_zipfile64. Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
* Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)Ammar Askar2017-07-191-3/+3
|
* bpo-30794: added kill() method to multiprocessing.Process (#2528)Vitor Pereira2017-07-181-7/+15
| | | | | | | | | | | | | | * bpo-30794: added kill() method to multiprocessing.Process * Added entries to documentation and NEWS * Refactored test_terminate and test_kill * Fix SIGTERM and SIGKILL being used on Windows for the tests * Added "versionadded" marker to the documentation * Fix trailing whitespace in doc
* [bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)Steve Dower2017-07-171-0/+1
| | | Updates ssl and tkinter projects to use pre-built externals
* bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712)Serhiy Storchaka2017-07-161-0/+4
|
* bpo-30836: fix test_c_locale_coercion on AIX (GH-2713)Nick Coghlan2017-07-151-1/+8
| | | | | | | | AIX uses iso8859-1 in the C locale, not ASCII AIX doesn't currently provide any of the locale coercion locales, but we leave locale coercion enabled in case one gets added in the future.
* bpo-30911: Add tests for bad boolean arguments for accelerated json (#2690)Serhiy Storchaka2017-07-131-0/+22
| | | encoder and decoder.
* Fix a spelling mistake and tweak tense of output for test.bisect (GH-2683)Brett Cannon2017-07-121-3/+3
| | | Changed "subbset" to "subset". Also made the sentences read like things were happening instead of stating what the code should do (in other words more descriptive than prescriptive).
* bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser ↵Louie Lu2017-07-121-0/+1
| | | | | | subclasses. (#2662) Patch by Louie Lu.
* bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680)Victor Stinner2017-07-121-0/+1
| | | | | | | | | | | | | tearDown() now clears explicitly the self.server variable to make sure that the thread is completely cleared when tearDownClass() checks if all threads have been cleaned up. Fix the following warning: $ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os (...) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) (...) Tests result: ENV CHANGED
* bpo-30876: Relative import from unloaded package now reimports the package ↵Serhiy Storchaka2017-07-124-4/+22
| | | | | | | | | (#2639) instead of failing with SystemError. Relative import from non-package now fails with ImportError rather than SystemError.
* bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)Serhiy Storchaka2017-07-112-3/+27
| | | | called with bytes-like argument.
* bpo-30878: Fix error message when keyword arguments are passed (#2635)Sylvain2017-07-091-0/+8
| | | to staticmethod() and classmethod().
* bpo-29854: Skip history-size test on older readline (GH-2621)Nir Soffer2017-07-081-0/+7
| | | | | | | | Turns out that history-size was added in readline 6.0. This explain why this tests fail on FreeBSD when using readline 5.2. We skip now the history size if readline does not support it. See https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES for details.
* bpo-29854: test_readline logs versions (#2619)Victor Stinner2017-07-071-2/+18
| | | | | * test_readline logs the versions of libreadline when run in verbose mode * Add also readline._READLINE_LIBRARY_VERSION
* bpo-29854: Fix segfault in call_readline() (GH-728)Nir Soffer2017-07-071-3/+40
| | | | | | | | | | | | | If history-length is set in .inputrc, and the history file is double the history size (or more), history_get(N) returns NULL, and python segfaults. Fix that by checking for NULL return value. It seems that the root cause is incorrect handling of bigger history in readline, but Python should not segfault even if readline returns unexpected value. This issue affects only GNU readline. When using libedit emulation system history size option does not work.
* Make test_shutil test_disk_usage not depend on the cwd fs (#2597)Gregory P. Smith2017-07-071-1/+1
| | | Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
* bpo-30814: Fixed a race condition when import a submodule from a package. ↵Serhiy Storchaka2017-07-063-0/+30
| | | | (#2580)
* bpo-30828: Fix out of bounds write in ↵Yury Selivanov2017-07-051-1/+23
| | | | `asyncio.CFuture.remove_done_callback() (#2569)
* Revert "bpo-30822: Fix testing of datetime module." (#2588)Victor Stinner2017-07-052-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "bpo-30854: Fix compile error when --without-threads (#2581)" This reverts commit 0c3116309307ad2c7f8e2d2096612f4ab33cbb62. * Revert "NEWS for 30777 (#2576)" This reverts commit aaa917ff38f9869eeebe3bc9469bfee64089d826. * Revert "bpo-21624: IDLE -- minor htest fixes (#2575)" This reverts commit 2000150c569941584994ec4ec59171961209bec3. * Revert "bpo-30777: IDLE: configdialog - add docstrings and improve comments (#2440)" This reverts commit 7eb5883ac59833bf63f0e1f7fb95671a1ac1ee08. * Revert "bpo-30319: socket.close() now ignores ECONNRESET (#2565)" This reverts commit 67e1478dba6efe60b8e1890192014b8b06dd6bd9. * Revert "bpo-30789: Use a single memory block for co_extra. (#2555)" This reverts commit 378ebb6578b9d709f38b888d23874c0b18125249. * Revert "bpo-30845: Enhance test_concurrent_futures cleanup (#2564)" This reverts commit 3df9dec425b0254df1cdf41922fd8d6b08bf47e4. * Revert "bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)" This reverts commit 48350412b70c76fa51f488cfc736c80d59b5e8eb. * Revert "Remove outdated FOX from GUI FAQ (GH-2538)" This reverts commit d3ed2877a798d07df75422afe136b4727e500c99. * Revert "bpo-6691: Pyclbr now reports nested classes and functions. (#2503)" This reverts commit 246ff3bd00f97658e567a7087645a6b76e056491. * Revert "bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)" This reverts commit 6969eaf4682beb01bc95eeb14f5ce6c01312e297. * Revert "bpo-30832: Remove own implementation for thread-local storage (#2537)" This reverts commit aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c. * Revert "bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)" This reverts commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b. * Revert "bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534)" This reverts commit 34b54873b51a1ebee2a3c57b7205537b4f33128d. * Revert "bpo-30822: Fix testing of datetime module. (#2530)" This reverts commit 98b6bc3bf72532b784a1c1fa76eaa6026a663e44.
* bpo-30845: Enhance test_concurrent_futures cleanup (#2564)Victor Stinner2017-07-042-1/+9
| | | | | | | | | | | * 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).
* bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)Antoine Pitrou2017-07-041-7/+59
| | | | | | * bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` * Add NEWS blurb
* bpo-6691: Pyclbr now reports nested classes and functions. (#2503)csabella2017-07-041-0/+66
| | | Original patch by Guilherme Polo. Revisions by Cheryl Sabella.
* bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)Victor Stinner2017-07-031-1/+3
| | | --forever now stops if a fail changes the environment.
* bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534)Serhiy Storchaka2017-07-021-0/+1
|
* bpo-30822: Fix testing of datetime module. (#2530)Utkarsh Upadhyay2017-07-022-8/+12
| | | | Only C implementation was tested.
* bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409)Osvaldo Santana Neto2017-07-011-0/+24
|
* bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406)xdegaye2017-07-011-1/+33
|
* bpo-30818: test_ftplib calls asyncore.close_all() (#2514)Victor Stinner2017-06-301-0/+3
| | | | | | | | | | Always clear asyncore socket map using asyncore.close_all(ignore_all=True) in tearDown() method. This change should fix this warning: Warning -- asyncore.socket_map was modified by test_ftplib Before: {} After: {4: <test.test_ftplib.DummyTLS_FTPServer 127.0.0.1:0 at 0x805feccf0>}
* test_urllib2_localnet: clear server variable (#2510)Victor Stinner2017-06-301-4/+13
| | | | Set the server attribute to None in cleanup to avoid dangling threads.
* bpo-30812: Fix test_warnings, restore _showwarnmsg (#2504)Victor Stinner2017-06-301-4/+9
| | | | bpo-26568, bpo-30812: Fix test_showwarnmsg_missing(): restore the attribute after removing it.
* bpo-30280: Cleanup threads in ayncio tests (#2501)Victor Stinner2017-06-301-5/+3
| | | | | | | | | | | | | | | | * bpo-30280: asyncio now cleans up threads asyncio base TestCase now uses threading_setup() and threading_cleanup() of test.support to cleanup threads. * asyncio: Fix TestBaseSelectorEventLoop cleanup bpo-30280: TestBaseSelectorEventLoop of test.test_asyncio.test_selector_events now correctly closes the event loop: cleanup its executor to not leak threads. Don't override the close() method of the event loop, only override the_close_self_pipe() method.