summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
Commit message (Collapse)AuthorAgeFilesLines
* skip tests with a non-ascii cwd when the file system encoding is asciiEzio Melotti2010-02-201-0/+7
|
* #7712: add a temp_cwd context manager to test_support and use it in regrtest ↵Ezio Melotti2010-02-101-18/+33
| | | | to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch.
* Fix a typo in a docstring introduced in r77956.Brett Cannon2010-02-031-1/+1
|
* Update a docstring to suggest using importlib.import_module instead of ↵Brett Cannon2010-02-031-1/+1
| | | | calling __import__ directly.
* remove archaic functions from test_supportEzio Melotti2010-01-241-25/+1
|
* Use a custom timeout in test_support.open_urlresource.Antoine Pitrou2009-11-011-2/+10
|
* Issue #7222: Make thread "reaping" more reliable so that referenceAntoine Pitrou2009-10-301-12/+17
| | | | | | | leak-chasing test runs give sensible results. The previous method of reaping threads could return successfully while some Thread objects were still referenced. This also introduces a new private function: :func:hread._count().
* Clarify error report message, and don't recommend running in verboseR. David Murray2009-10-191-1/+3
| | | | mode for more information if we are already running in verbose mode.
* Silence a deprecation warning by using the appropriate replacement constructNick Coghlan2009-10-181-1/+3
|
* Move restoration of the os.environ object into the context manager where it ↵Nick Coghlan2009-10-171-0/+1
| | | | belongs
* Don't invoke reload(sys) and use StringIO objects instead of real files to ↵Nick Coghlan2009-10-171-0/+3
| | | | capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
* Restore original sys.path when running TTK testsNick Coghlan2009-10-171-0/+25
|
* put downloaded test support files in Lib/test/data instead of the cwdBenjamin Peterson2009-07-111-5/+4
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-1/+1
|
* Issue #6215: backport the 3.1 io libAntoine Pitrou2009-06-121-1/+16
|
* remove function importBenjamin Peterson2009-05-311-1/+1
|
* Issue #6152: New option '-j'/'--multiprocess' for regrtest allows runningAntoine Pitrou2009-05-311-0/+4
| | | | regression tests in parallel, shortening the total runtime.
* a useful decorator for cleaning up threadsBenjamin Peterson2009-05-141-0/+11
|
* Make test.test_support.EnvironmentVarGuard behave like a dictionary.Walter Dörwald2009-05-011-11/+25
| | | | | All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block.
* Issue #5837: Certain sequences of calls to set() and unset() forWalter Dörwald2009-04-251-15/+17
| | | | | | | | support.EnvironmentVarGuard objects restored the environment variables incorrectly on __exit__. Fix this by recording the initial value of each environment variable on the first access in set() or unset().
* Issue 5354: Change API for import_fresh_module() to better support ↵Nick Coghlan2009-04-221-14/+48
| | | | test_warnings use case (also fixes some bugs in the original implementation)
* Issue 5354: Provide a standardised testing mechanism for doing fresh imports ↵Nick Coghlan2009-04-111-7/+48
| | | | of modules, including the ability to block extension modules in order to test the pure Python fallbacks
* Improve test_support.import_module docstring, removeR. David Murray2009-03-311-16/+14
| | | | | deprecated flag from get_attribute since it isn't likely to do anything useful.
* A few more test skips via import_module, and change import_module toR. David Murray2009-03-311-2/+2
| | | | | | | return the error message produced by importlib, so that if an import in the package whose import is being wrapped is what failed the skip message will contain the name of that module instead of the name of the wrapped module. Also fixed formatting of some previous comments.
* Change more tests to use import_module for the modules thatR. David Murray2009-03-301-7/+10
| | | | | should cause tests to be skipped. Also rename import_function to the more descriptive get_attribute and add a docstring.
* Add import_function method to test.test_support, and modify a number ofR. David Murray2009-03-301-0/+14
| | | | | | | | tests that expect to be skipped if imports fail or functions don't exist to use import_function and import_module. The ultimate goal is to change regrtest to not skip automatically on ImportError. Checking in now to make sure the buldbots don't show any errors on platforms I can't direct test on.
* ** is required hereBenjamin Peterson2009-03-261-1/+1
|
* must pass argument to get expected behavior ;)Benjamin Peterson2009-03-261-1/+1
|
* fix incorrect auto-translation of TestSkipped -> unittest.SkipTestBenjamin Peterson2009-03-261-1/+1
|
* fix namingBenjamin Peterson2009-03-261-1/+1
|
* remove test_support.TestSkipped and just use unittest.SkipTestBenjamin Peterson2009-03-261-14/+4
|
* add some useful utilities for skipping tests with unittest's new skipping ↵Benjamin Peterson2009-03-261-1/+67
| | | | | | | ability most significantly apply a modified portion of the patch from #4242 with patches for skipping implementation details
* this can be slightly less uglyBenjamin Peterson2009-03-251-1/+1
|
* this is better written using assertRaisesBenjamin Peterson2009-03-241-6/+2
|
* make bad file descriptor tests more robustBenjamin Peterson2009-01-191-0/+12
|
* Issue #3781: Final cleanup of warnings.catch_warnings and its usage in the ↵Nick Coghlan2008-09-111-1/+24
| | | | test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
* warnings.catch_warnings() now returns a list or None instead of the customBrett Cannon2008-09-091-6/+2
| | | | | | | | WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson.
* Move test.test_support.catch_warning() to the warnings module, rename itBrett Cannon2008-09-021-65/+2
| | | | | | | | | | | catch_warnings(), and clean up the API. While expanding the test suite, a bug was found where a warning about the 'line' argument to showwarning() was not letting functions with '*args' go without a warning. Closes issue 3602. Code review by Benjamin Peterson.
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-311-0/+25
|
* Backport test.support.fcmp() from 3.0 to silence -3 warnings.Brett Cannon2008-07-311-5/+4
|
* remove unneeded importBenjamin Peterson2008-07-221-1/+0
|
* Remove duplicate entry in __all__.Georg Brandl2008-07-181-1/+1
|
* Make test.test_support.catch_warnings more robust as discussed on ↵Nick Coghlan2008-07-131-27/+44
| | | | python-dev. Also add explicit tests for itto test_warnings.
* remove some __getslice__Benjamin Peterson2008-05-271-5/+1
|
* add __all__ to test_supportBenjamin Peterson2008-05-261-0/+13
|
* Fixed typo in a comment of test_support.CleanImport.Alexandre Vassalotti2008-05-111-1/+1
|
* Added test framework for handling module renames.Alexandre Vassalotti2008-05-111-0/+33
| | | | | Factored the import guard in test_py3kwarn.TestStdlibRemovals into a context manager, namely test_support.CleanImport.
* Suppress deprecations for packages as well when usingBrett Cannon2008-05-101-1/+2
| | | | test.test_support.import_module().
* Fix a bug introduced by the addition of the 'record' argument toBrett Cannon2008-05-081-2/+2
| | | | | test.test_support.catch_warning() where showwarning() was not being set properly.
* Make test.test_support.catch_warning() take an argument specifying if anyBrett Cannon2008-05-081-5/+6
| | | | | | triggered warnings should be captured. This allows the context manager to be used to just prevent the internal state of the 'warnings' framework and thus allow triggered warnings to be displayed.