summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30458: Disable https related urllib tests on a build without ssl (GH-13032)Xtreak2019-05-011-0/+2
| | | | | | These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. https://bugs.python.org/issue30458
* bpo-30458: Disallow control chars in http URLs. (GH-12755)Gregory P. Smith2019-05-012-2/+56
| | | Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.
* bpo-36763: Add _PyCoreConfig_SetArgv() (GH-13030)Victor Stinner2019-05-011-2/+1
| | | | | | | | | * Add 2 new config methods: * _PyCoreConfig_SetArgv() * _PyCoreConfig_SetWideArgv() * Add also an internal _PyCoreConfig_SetPyArgv() method. * Remove 'args' parameter from _PyCoreConfig_Read().
* bpo-36742: Fixes handling of pre-normalization characters in urlsplit() ↵Steve Dower2019-04-301-0/+6
| | | | (GH-13017)
* bpo-36018: Test idempotence. Test two methods against one-another. (GH-13021)Raymond Hettinger2019-04-301-0/+23
|
* bpo-36751: Deprecate getfullargspec and report positional-only args as ↵Pablo Galindo2019-04-301-34/+42
| | | | | | | | regular args (GH-13016) * bpo-36751: Deprecate getfullargspec and report positional-only args as regular args * Use inspect.signature in testhelpers
* bpo-1613500: Don't hardcode output file mode in fileinput.FileInput (GH-12986)Berker Peksag2019-04-291-0/+10
|
* bpo-36004: Add date.fromisocalendar (GH-11888)Paul Ganssle2019-04-291-0/+76
| | | | This commit implements the first version of date.fromisocalendar, the inverse function for date.isocalendar.
* bpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)xdegaye2019-04-291-4/+11
|
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-2912-69/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests
* bpo-36546: More tests: type preservation and equal inputs (#13000)Raymond Hettinger2019-04-291-12/+18
|
* bpo-36729: Delete unused text variable on tests. (GH-12959)Emmanuel Arias2019-04-291-4/+0
|
* bpo-32424: Improve test coverage for xml.etree.ElementTree (GH-12891)Gordon P. Hemsley2019-04-281-2/+85
| | | | * Fix typo in test_cyclic_gc subtest * Improve test coverage for xml.etree.ElementTree
* bpo-36025: Fix PyDate_FromTimestamp API (GH-11922)Paul Ganssle2019-04-271-0/+35
| | | | | | | | | | | | | In the process of converting the date.fromtimestamp function to use argument clinic in GH-8535, the C API for PyDate_FromTimestamp was inadvertently changed to expect a timestamp object rather than an argument tuple. This PR fixes this backwards-incompatible change by adding a new wrapper function for the C API function that unwraps the argument tuple and passes it to the underlying function. This PR also adds tests for both PyDate_FromTimestamp and PyDateTime_FromTimestamp to prevent any further regressions.
* bpo-36719: regrtest closes explicitly WindowsLoadTracker (GH-12965)Victor Stinner2019-04-262-14/+29
| | | | Regrtest.finalize() now closes explicitly the WindowsLoadTracker instance.
* bpo-36719: Fix regrtest re-run (GH-12964)Victor Stinner2019-04-263-14/+35
| | | | | Properly handle a test which fail but then pass. Add test_rerun_success() unit test.
* bpo-36719: regrtest always detect uncollectable objects (GH-12951)Victor Stinner2019-04-264-69/+62
| | | | | | | regrtest now always detects uncollectable objects. Previously, the check was only enabled by --findleaks. The check now also works with -jN/--multiprocess N. --findleaks becomes a deprecated alias to --fail-env-changed.
* bpo-36669: add matmul support to weakref.proxy (GH-12932)Mark Dickinson2019-04-261-0/+15
|
* bpo-36725: Refactor regrtest multiprocessing code (GH-12961)Victor Stinner2019-04-264-152/+202
| | | | | | | | | | | | | | | | Rewrite run_tests_multiprocess() function as a new MultiprocessRunner class with multiple methods to better report errors and stop immediately when needed. Changes: * Worker processes are now killed immediately if tests are interrupted or if a test does crash (CHILD_ERROR): worker processes are killed. * Rewrite how errors in a worker thread are reported to the main thread. No longer ignore BaseException or parsing errors silently. * Remove 'finished' variable: use worker.is_alive() instead * Always compute omitted tests. Add Regrtest.get_executed() method.
* bpo-36725: regrtest: add TestResult type (GH-12960)Victor Stinner2019-04-268-208/+286
| | | | | | | | | | | | | | | * Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
* bpo-35920: Windows 10 ARM32 platform support (GH-11774)Paul Monson2019-04-256-4/+42
|
* bpo-36465: Fix test_regrtest on Windows (GH-12945)Victor Stinner2019-04-241-1/+1
| | | | | | Fix Py_DEBUG constant: check for sys.gettotalrefcount attribute rather than sys.getobjects. Update also SpecialBuilds.txt documentation.
* bpo-36465: Make release and debug ABI compatible (GH-12615)Victor Stinner2019-04-241-1/+1
| | | | | | | | | | | | | | 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
* bpo-36668: FIX reuse semaphore tracker for child processes (#5172)Thomas Moreau2019-04-241-0/+28
| | | Fix the multiprocessing.semaphore_tracker so it is reused by child processes.
* bpo-36454: Fix test_time.test_monotonic() (GH-12929)Victor Stinner2019-04-231-2/+3
| | | | | Change test_time.test_monotonic() to test only the lower bound of elapsed time after a sleep command rather than the upper bound. This prevents unnecessary test failures on slow buildbots. Patch by Victor Stinner.
* bpo-36546: Add statistics.quantiles() (#12710)Raymond Hettinger2019-04-231-0/+142
|
* bpo-36679: Rename duplicate test_class_getitem function (GH-12892)Windson yang2019-04-221-1/+1
|
* bpo-36680: Rename duplicate test_source_from_cache_path_like_arg function ↵Windson yang2019-04-221-1/+1
| | | | (GH-12893)
* bpo-36681: Remove duplicate test_regression_29220 function (GH-12894)Windson yang2019-04-221-6/+0
|
* bpo-36682: Rename duplicate tests in test_sys_setprofile (GH-12895)Windson yang2019-04-221-2/+2
|
* bpo-36683: Rename duplicate test_io_encoding to test_pyio_encoding (GH-12896)Windson yang2019-04-221-1/+1
|
* bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899)Windson yang2019-04-221-15/+3
|
* bpo-29734: Cleanup test_getfinalpathname_handles test (GH-12908)Berker Peksag2019-04-221-21/+14
|
* bpo-36650: Fix handling of empty keyword args in C version of lru_cache. ↵Raymond Hettinger2019-04-201-0/+14
| | | | (GH-12881)
* bpo-30485: Change the prefix for defining the default namespace in ↵Stefan Behnel2019-04-181-1/+1
| | | | ElementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860)
* bpo-36635: Add _testinternalcapi module (GH-12841)Victor Stinner2019-04-181-1/+1
| | | | | | Add a new _testinternalcapi module to test the internal C API. Move _Py_GetConfigsAsDict() function to the internal C API: _testembed now uses _testinternalcapi to access the function.
* bpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849)Paul Monson2019-04-181-2/+7
|
* bpo-31904: Port test_resource to VxWorks (GH-12719)Lihua Zhao2019-04-171-0/+4
| | | Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.
* bpo-31904: Port test_cmd_line to VxWorks (#12648)Lihua Zhao2019-04-171-0/+2
| | | subprocess.Popen doesn't support preexec on VxWorks.
* bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858)Victor Stinner2019-04-171-0/+68
| | | | | | | | | | | | | | | | shutil.which() and distutils.spawn.find_executable() now use os.confstr("CS_PATH") if available instead of os.defpath, if the PATH environment variable is not set. Don't use os.confstr("CS_PATH") nor os.defpath if the PATH environment variable is set to an empty string to mimick Unix 'which' command behavior. Changes: * find_executable() now starts by checking for the executable in the current working directly case. Add an explicit "if not path: return None". * Add tests for PATH='' (empty string), PATH=':' and for PATHEXT.
* bpo-31904: Fix test_tabnanny on VxWorks (GH-12646)Lihua Zhao2019-04-171-2/+4
| | | | Fix test_tabnanny on VxWorks: adjust ENOENT error message, use os.strerror().
* bpo-27860: ipaddress: fix Interface missed some attributes (GH-12836)Inada Naoki2019-04-151-1/+16
| | | | | | | IPv4Interface and IPv6Interface did not has netmask and hostmask attributes when its argument is bytes or int. This commit extracts method for constructors of Network and Interface, and ensure Interface class always provides them.
* bpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)Victor Stinner2019-04-151-4/+4
| | | | | | | | | | | | The imap.IMAP4.logout() method no longer ignores silently arbitrary exceptions. Changes: * The IMAP4.logout() method now expects a "BYE" untagged response, rather than relying on _check_bye() which raises a self.abort() exception. * IMAP4.__exit__() now does nothing if the client already logged out. * Add more debug info if test_logout() tests fail.
* bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)Victor Stinner2019-04-153-16/+19
| | | | Fix test_imap4_host_default_value() of test_imaplib: catch also errno.ENETUNREACH error.
* bpo-31904: Port the time module on VxWorks (GH-12305)pxinwr2019-04-151-1/+5
| | | time.clock() is not available on VxWorks.
* bpo-27860: use cached_property (GH-12832)Inada Naoki2019-04-151-27/+10
| | | | * cached_property is more efficient than hand crafted cache. * In IPv[46]Network, `self.network.prefixlen` is same to `self._prefixlen`.
* bpo-30485: Re-allow empty strings in ElementPath namespace mappings since ↵Stefan Behnel2019-04-141-3/+0
| | | | they might actually be harmless and unused (and thus went undetected previously). (#12830)
* bpo-16079: fix duplicate test method name in test_gzip. (GH-12827)Gregory P. Smith2019-04-141-1/+1
|
* bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)Mickaël Schoentgen2019-04-141-1/+12
|
* bpo-30485: support a default prefix mapping in ElementPath by passing None ↵Stefan Behnel2019-04-141-0/+6
| | | | as prefix (#1823)