summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
Commit message (Collapse)AuthorAgeFilesLines
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-311-0/+25
|
* Backport r58453:Neal Norwitz2008-01-271-2/+12
| | | | | | | | | | Let the O/S supply a port if none of the default ports can be used. This should make the tests more robust at the expense of allowing tests to be sloppier by not requiring them to cleanup after themselves. (It will legitamitely help when running two test suites simultaneously or if another process is already using one of the predefined ports.) This will hopefully fix test_asynchat.
* Concatenation on a long string breaks (SF #1526585).Armin Rigo2006-08-091-1/+20
|
* Add new utility function, reap_children(), to test_support. This shouldNeal Norwitz2006-06-291-0/+21
| | | | | | | | | | be called at the end of each test that spawns children (perhaps it should be called from regrtest instead?). This will hopefully prevent some of the unexplained failures in the buildbots (hppa and alpha) during tests that spawn children. The problems were not reproducible. There were many zombies that remained at the end of several tests. In the worst case, this shouldn't cause any more problems, though it may not help either. Time will tell.
* Whitespace normalization.Tim Peters2006-06-191-1/+0
|
* Prevent spurious leaks when running regrtest.py -R. There may be moreNeal Norwitz2006-06-181-0/+23
| | | | | | | | issues that crop up from time to time, but this change seems to have been pretty stable (no spurious warnings) for about a week. Other modules which use threads may require similar use of threading_setup/threading_cleanup from test_support.
* Fix the socket tests so they can be run concurrently. Backport candidateNeal Norwitz2006-06-121-0/+18
|
* Bug #1473625: stop cPickle making float dumps locale dependent in protocol 0.Georg Brandl2006-04-301-0/+36
| | | | | On the way, add a decorator to test_support to facilitate running single test functions in different locales with automatic cleanup.
* Do the small-memory run of big-meormy tests using a prime number, ratherThomas Wouters2006-04-271-1/+1
| | | | | than a convenient power-of-2-and-multiple-of-5, so incorrect testing algorithms fail more easily.
* Whitespace normalization.Tim Peters2006-04-261-1/+1
|
* The result of SF patch #1471578: big-memory tests for strings, lists andThomas Wouters2006-04-261-1/+69
| | | | | | tuples. Lots to be added, still, but this will give big-memory people something to play with in 2.5 alpha 2, and hopefully get more people to write these tests.
* Convenience function to remove a possibly non-existant fileNeal Norwitz2006-01-231-14/+10
|
* Patch #1276356: Implement new resource "urlfetch" for regrtest.Hye-Shik Chang2005-12-101-0/+14
| | | | | This enables even impatient people to run tests that require remote files such as test_normalization and test_codecmaps_*.
* Build with --disable-unicode again. Fixes #1158607.Martin v. Löwis2005-03-081-1/+1
| | | | Will backport to 2.4.
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Typo repair; added some comments and horizontal whitespace.Tim Peters2003-12-041-9/+10
|
* Fix test_unicode_file errors on platforms without Unicode file support,Mark Hammond2003-12-031-15/+21
| | | | | by setting TESTFN_UNICODE_UNENCODEABLE on these platforms. test_unicode_file only attempts to use the name for testing if not None.
* Add TESTFN_UNICODE_UNENCODEABLE, a unicode filename that can not beMark Hammond2003-12-031-0/+21
| | | | encoded using the default file system encoding.
* Extend last change to cover TestSuites as well as TestCases.Raymond Hettinger2003-07-161-1/+1
|
* run_unittest() to support TestCase instances as well as classes. Helps with ↵Raymond Hettinger2003-07-161-1/+4
| | | | doctests.
* Include module name in doctest summary.Raymond Hettinger2003-05-171-1/+1
|
* Provide a clue that the doctests have run.Raymond Hettinger2003-05-171-1/+3
|
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-5/+5
| | | | riscospath.extsep, and use os.extsep throughout.
* 'forget' now also deletes any proper .pyo files.Brett Cannon2003-05-041-1/+19
| | | | Added some docstrings.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-7/+8
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Factor out common boilerplate for test_supportRaymond Hettinger2003-04-271-0/+6
|
* if the test is run directly (__name__ == "__main__") don't actually requireSkip Montanaro2003-04-241-0/+4
| | | | particular resources
* Always initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,Martin v. Löwis2003-03-051-2/+1
| | | | | and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding. Adjust test case.
* test_support.requires(): Instead of raising TestSkipped, raise a newFred Drake2003-02-031-1/+9
| | | | | | | | | exception, ResourceDenied. This is used to distinguish between tests that are skipped for other reasons (platform support, missing data, etc.) from those that are skipped because a "resource" has not been enabled. This prevents those tests from being reported as unexpected skips for the platform; those should only be considered unexpected skips if the resource were enabled.
* Rearrange test_socket_ssl so that a skip is expected iff the networkTim Peters2002-12-041-1/+4
| | | | resource isn't enabled or the socket module doesn't support ssl.
* Don't try to convert the test filename to Unicode with -U.Martin v. Löwis2002-11-091-1/+6
|
* Whitespace normalization.Tim Peters2002-11-091-1/+1
|
* Fix SF # 631066, running regrtest in user mode failsNeal Norwitz2002-11-031-1/+21
| | | | | | Try to write to TESTFN, if that fails, try TESTFN in /tmp If that fails, print a warning and go on. Will backport.
* Patch #631972: Adds an is_jython flag.Finn Bock2002-11-011-0/+2
|
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-0/+3
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* test_support: add a docstring to vereq().Tim Peters2001-12-291-0/+10
| | | | test_complex: repair new test's usage of vereq().
* Fix bad bug in structseq slicing (NULL pointers in result). Reported byTim Peters2001-10-301-0/+4
| | | | | | Jack Jansen on python-dev. Add simple test case. Move vereq() from test_descr to test_support (it's handy!).
* run_suite(): If testclass is not available, provide an even more generalFred Drake2001-10-041-4/+8
| | | | | | | error message. run_unittest(): Provide the testclass to run_suite() so it can construct the error message. This closes SF bug #467763.
* SF bug [#467336] doctest failures w/ new-style classes.Tim Peters2001-10-031-1/+2
| | | | | | | | | | Taught doctest about static methods, class methods, and property docstrings in new-style classes. As for inspect.py/pydoc.py before it, the new stuff needed didn't really fit into the old architecture (but was less of a strain to force-fit here). New-style class docstrings still aren't found, but that's the subject of a different bug and I want to fix that right instead of hacking around it in doctest.
* Guido points out that sys.__stdout__ is a bit bucket under IDLE. So keepTim Peters2001-09-251-1/+12
| | | | | | | the local save/modify/restore of sys.stdout, but add machinery so that regrtest can tell test_support the value of sys.stdout at the time regrtest.main() started, and test_support can pass that out later to anyone who needs a "visible" stdout.
* Get rid of the increasingly convoluted global tricks w/ sys.stdout, inTim Peters2001-09-251-26/+10
| | | | favor of local save/modify/restore. The test suite should run fine again.
* Set sys.save_stdout (to sys.stdout), so doctest-using tests can be runGuido van Rossum2001-09-251-0/+2
| | | | standalone.
* Oops. I didn't expect that some tests (test_cookie) have expectedGuido van Rossum2001-09-211-0/+1
| | | | | output *and* doctest stuff. Assuming the doctest stuff comes after the expected output, this fixes that.
* Change the way unexpected output is reported: rather than stopping atGuido van Rossum2001-09-211-16/+12
| | | | | | | | | | the first difference, let the test run till completion, then gather all the output and compare it to the expected output using difflib. XXX Still to do: produce diff output that only shows the sections that differ; currently it produces ndiff-style output because that's the easiest to produce with difflib, but this becomes a liability when the output is voluminous and there are only a few differences.
* run_suite(): Oops, update a docstring.Barry Warsaw2001-09-201-1/+1
|
* run_suite(): Factor this out of run_unittest() for tests that buildBarry Warsaw2001-09-201-2/+7
| | | | | | | | their own test suite from a multitude of classes (like test_email.py will be doing). run_unittest(): Call run_suite() after making a suite from the testclass.
* Repair late-night doc typos.Tim Peters2001-09-101-2/+2
|
* Teach regrtest how to pass on doctest failure msgs. This is done via aTim Peters2001-09-091-1/+46
| | | | | | | | | | | horridly inefficient hack in regrtest's Compare class, but it's about as clean as can be: regrtest has to set up the Compare instance before importing a test module, and by the time the module *is* imported it's too late to change that decision. The good news is that the more tests we convert to unittest and doctest, the less the inefficiency here matters. Even now there are few tests with large expected-output files (the new cost here is a Python-level call per .write() when there's an expected- output file).
* It appears that unittest was changed to stop hoarding raw exception data,Tim Peters2001-09-081-4/+1
| | | | | | | | | saving instead a traceback string, but test_support's run_unittest was still peeking into unittest internals and trying to pick apart unittest's errors and failures vectors as if they contained exc_info() tuples instead of strings. Whatever, when a unittest-based test failed, test_support blew up. I'm not sure this is the right way to fix it; it simply gets me unstuck.
* Two small changes to the resource usage option:Guido van Rossum2001-09-061-2/+2
| | | | | | | | (1) Allow multiple -u options to extend each other (and the initial value of use_resources passed into regrtest.main()). (2) When a test is run stand-alone (not via regrtest.py), needed resources are always granted.