summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xmlrpc.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-108834: Sync libregrtest with the main branch (#108966)Victor Stinner2023-09-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gh-108834: regrtest reruns failed tests in subprocesses (#108839) When using --rerun option, regrtest now re-runs failed tests in verbose mode in fresh worker processes to have more deterministic behavior. So it can write its final report even if a test killed a worker progress. Add --fail-rerun option to regrtest: exit with non-zero exit code if a test failed pass passed when re-run in verbose mode (in a fresh process). That's now more useful since tests can pass when re-run in a fresh worker progress, whereas they failed when run after other tests when tests are run sequentially. Rename --verbose2 option (-w) to --rerun. Keep --verbose2 as a deprecated alias. Changes: * Fix and enhance statistics in regrtest summary. Add "(filtered)" when --match and/or --ignore options are used. * Add RunTests class. * Add TestResult.get_rerun_match_tests() method * Rewrite code to serialize/deserialize worker arguments as JSON using a new WorkerJob class. * Fix stats when a test is run with --forever --rerun. * If failed test names cannot be parsed, log a warning and don't filter tests. * test_regrtest.test_rerun_success() now uses a marker file, since the test is re-run in a separated process. * Add tests on normalize_test_name() function. * Add test_success() and test_skip() tests to test_regrtest. (cherry picked from commit 31c2945f143c6b80c837fcf09a5cfb85fea9ea4c) * gh-108834: regrtest --fail-rerun exits with code 5 (#108896) When the --fail-rerun option is used and a test fails and then pass, regrtest now uses exit code 5 ("rerun) instead of 2 ("bad test"). (cherry picked from commit 1170d5a292b46f754cd29c245a040f1602f70301) * gh-108416: Mark slow but not CPU bound test methods with requires_resource('walltime') (GH-108480) (cherry picked from commit 1e0d62793a84001e92f1c80b511d3a212b435acc) * Manually sync Lib/test/libregrtest/ from main --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-021-0/+10
| | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+2
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-061-1/+1
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-45229: Remove test_main in many tests (GH-28405)Serhiy Storchaka2021-09-191-10/+4
| | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests.
* bpo-43433: Preserve query and fragment in the URL of the server in ↵Serhiy Storchaka2021-03-291-1/+39
| | | | ServerProxy. (GH-25057)
* bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)Christian Heimes2020-11-201-2/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-251-2/+3
|
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-1/+2
|
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-1/+2
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)Serhiy Storchaka2019-08-081-8/+17
| | | | They now return NotImplemented for unsupported type of the other operand.
* bpo-30458: Disallow control chars in http URLs. (GH-12755)Gregory P. Smith2019-05-011-2/+7
| | | 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-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929)Serhiy Storchaka2019-03-051-7/+5
|
* bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308)Cédric Krier2019-02-191-1/+62
| | | Allow to add HTTP headers to XML-RPC requests sent to the server.
* bpo-18799: Resurrect test_404 in test_xmlrpc. (GH-11196)Vajrasky Kok2018-12-171-3/+2
|
* bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362)Serhiy Storchaka2018-06-041-1/+3
| | | It depended on a global variable set by other tests.
* Trivial cleanups following bpo-31370 (#3649)Antoine Pitrou2017-09-181-7/+1
| | | | | | * Trivial cleanups following bpo-31370 * Also cleanup the "importlib._bootstrap_external" module
* bpo-31234: Join threads in tests (#3572)Victor Stinner2017-09-141-2/+6
| | | | Call thread.join() on threads to prevent the "dangling threads" warning.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-7/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Stop test_xmlrpc from writing to sys.stderr (#3359)Christian Heimes2017-09-061-0/+4
| | | | | | | | One test case of test_xmlrpc uses HTTPServer with a subclass of BaseHTTPRequestHandler. The BaseRequestHandler class logs to sys.stderr by default. Override log_message() to not clobber test output. Signed-off-by: Christian Heimes <christian@python.org>
* Change assertRaises to assertRaisesRegex in test_xmlrpc (#481)Dillon Brock2017-03-051-3/+3
|
* bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (#260)Petr Motejlek2017-03-011-1/+89
| | | | (or any other exception) to exception(s) raised in the dispatched methods. Patch by Petr Motejlek.
* bpo-7769: enable xmlrpc.server.SimpleXMLRPCDispatcher.register_function used ↵Xiang Zhang2017-02-281-6/+7
| | | | as decorator (GH-231)
* Issue #26885: xmlrpc now supports unmarshalling additional data types usedSerhiy Storchaka2016-09-111-0/+49
| | | | by Apache XML-RPC implementation for numerics and None.
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Backed out changeset af29d89083b3 (closes #25548) (closes #27498)Benjamin Peterson2016-07-141-2/+2
|
* Issue #25548: Showing memory address of class objects in replKushal Das2016-06-041-2/+2
|
* Issue #26873: xmlrpc now raises ResponseError on unsupported type tagsSerhiy Storchaka2016-05-041-0/+14
|\ | | | | | | instead of silently return incorrect result.
| * Issue #26873: xmlrpc now raises ResponseError on unsupported type tagsSerhiy Storchaka2016-05-041-0/+14
| | | | | | | | instead of silently return incorrect result.
* | Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-241-1/+0
| |
* | Issue #23277: Remove more unused sys and os imports.Serhiy Storchaka2016-04-241-1/+0
|/
* Issue #26402: Fix XML-RPC client retrying after server disconnectionMartin Panter2016-02-251-0/+37
| | | | | This is a regression introduced in 3.5 by revision eba80326ba53. Fix by Jelte Fennema, test case by me.
* Issue #26147: xmlrpc now works with strings not encodable with usedSerhiy Storchaka2016-01-201-6/+24
| | | | non-UTF-8 encoding.
* Issue #9006: Added tests for XML RPC with non-UTF-8 encoding.Serhiy Storchaka2016-01-181-3/+53
|
* Use assertRaisesRegex instead of deprecated assertRaisesRegexp.Serhiy Storchaka2015-04-101-1/+1
|\
| * Use assertRaisesRegex instead of deprecated assertRaisesRegexp.Serhiy Storchaka2015-04-101-2/+2
| |
* | Stop using a deprecated unittest.TestCase method.Brett Cannon2014-12-121-1/+1
| |
* | merge 3.4 (#16043)Benjamin Peterson2014-12-061-2/+23
|\ \ | |/
| * merge 3.3 (#16043)Benjamin Peterson2014-12-061-2/+23
| |\
| | * merge 3.2 (#16043)Benjamin Peterson2014-12-061-1/+22
| | |\
| | | * add a default limit for the amount of data xmlrpclib.gzip_decode will return ↵Benjamin Peterson2014-12-061-1/+22
| | | | | | | | | | | | | | | | (closes #16043)
* | | | Removed duplicated words in in comments and docs.Serhiy Storchaka2014-12-011-1/+1
|\ \ \ \ | |/ / /
| * | | Removed duplicated words in in comments and docs.Serhiy Storchaka2014-12-011-1/+1
| | | |
* | | | Issue #22031: Reprs now always use hexadecimal format with the "0x" prefixSerhiy Storchaka2014-07-221-1/+1
| | | | | | | | | | | | | | | | when contain an id in form " at 0x...".
* | | | Issue #20627: xmlrpc.client.ServerProxy is now a context manager.Brett Cannon2014-03-211-0/+18
|/ / / | | | | | | | | | Patch by Claudiu Popa.
* | | #19192: Give up on time.xmlrpc.com as an xmlrpc network test.R David Murray2013-10-111-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | time.xmlrpc.com has come and gone over the years, and has been gone again for a while. The test did test one thing that the current xmlrpc tests don't: the use of multiple levels of attribute names in the call. So in addition to removing the network test, we add a test in xmlrpc of dotted name access. There should also be a test for when dotted name access is disallowed, but that requires more extensive test harness refactoring, and in any case was not tested by the network test we are deleting, since it is a server-side setting. This is a slightly simplified version of a patch by Vajrasky Kok.
* | | #18453: merge with 3.3.Ezio Melotti2013-08-101-2/+10
|\ \ \ | |/ /
| * | #18453: fix unused variables in test_xmlrpc. Patch by Vajrasky Kok.Ezio Melotti2013-08-101-2/+10
| | |
* | | Issue #15767: Excise the remaining instances of ModuleNotFoundErrorBrett Cannon2013-07-041-2/+2
| | |
* | | Partially revert changeset #281857369a78 to make sure threads areBrett Cannon2013-06-131-1/+11
| | | | | | | | | | | | reaped in all situations.