summaryrefslogtreecommitdiff
path: root/Lib/test/support.py
Commit message (Collapse)AuthorAgeFilesLines
* Close #15494: test.support is now a package rather than a moduleNick Coghlan2013-07-281-1989/+0
| | | | Initial patch by Indra Talip
* Merge #17987: properly document support.captured_xxx.R David Murray2013-07-111-2/+17
|\
| * #17987: properly document support.captured_xxx.R David Murray2013-07-111-2/+17
| | | | | | | | Patch by Dmi Baranov.
* | Issue #15767: Excise the remaining instances of ModuleNotFoundErrorBrett Cannon2013-07-041-8/+8
| |
* | Issue #18223: Refactor test_tarfile.Serhiy Storchaka2013-06-171-1/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * Use mixins for generating tests for different compression types. * Make test_tarfile discoverable. * Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue. * Add explicit test skips instead of reporting skipped tests as passed. * Wrap long lines. * Correct a comment for test_hardlink_extraction1. * Add support.requires_gzip. * Replace ImportError by ModuleNotFoundError. and some other minor enhancements.
| * Issue #18223: Refactor test_tarfile.Serhiy Storchaka2013-06-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Use mixins for generating tests for different compression types. * Make test_tarfile discoverable. * Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue. * Add explicit test skips instead of reporting skipped tests as passed. * Wrap long lines. * Correct a comment for test_hardlink_extraction1. * Add support.requires_gzip. and some other minor enhancements.
* | Issue #17177: Stop using imp in a bunch of testsBrett Cannon2013-06-151-4/+4
| |
* | Move test___all__ over to unittest.main() and use ModuleNotFoundErrorBrett Cannon2013-06-121-7/+7
| |
* | Issue #17835: Fix test_io when the default OS pipe buffer size is larger ↵Antoine Pitrou2013-04-241-4/+6
|\ \ | |/ | | | | than one million bytes.
| * Issue #17835: Fix test_io when the default OS pipe buffer size is larger ↵Antoine Pitrou2013-04-241-4/+6
| | | | | | | | than one million bytes.
* | Use a larger amount of data for tests such as the interrupted_writeGregory P. Smith2013-03-191-3/+3
|\ \ | |/ | | | | | | | | | | | | | | tests that depend on filling up an OS pipe so that they work properly on systems configured with large pipe buffers. Also a subprocess docstring update that i forgot was in my client when i did the original 3.3 commit... easier to just leave that in here with this one than go back and undo/redo.
| * Use a larger amount of data for tests such as the interrupted_writeGregory P. Smith2013-03-191-3/+3
| | | | | | | | | | tests that depend on filling up an OS pipe so that they work properly on systems configured with large pipe buffers.
* | #11732: merge with 3.3.Ezio Melotti2013-03-071-1/+3
|\ \ | |/
| * #11732: make suppress_crash_popup() work on Windows XP and Windows Server 2003.Ezio Melotti2013-03-071-1/+3
| |
* | #11732: merge with 3.3.Ezio Melotti2013-03-051-1/+23
|\ \ | |/
| * #11732: add a new suppress_crash_popup() context manager to test.support.Ezio Melotti2013-03-051-1/+23
| |
* | modernize some modules' code by replacing ↵Giampaolo Rodola'2013-02-121-11/+6
| | | | | | | | OSError->ENOENT/ENOTDIR/EPERM/EEXIST occurrences with the corresponding pep-3151 exceptions (FileNotFoundError, NotADirectoryError, etc.)
* | Issue #17041: Fix testing when Python is configured with theSerhiy Storchaka2013-01-271-4/+10
|\ \ | |/ | | | | --without-doc-strings.
| * Issue #17041: Fix testing when Python is configured with theSerhiy Storchaka2013-01-271-4/+10
| |\ | | | | | | | | | --without-doc-strings.
| | * Issue #17041: Fix testing when Python is configured with theSerhiy Storchaka2013-01-271-0/+10
| | | | | | | | | | | | --without-doc-strings.
* | | Merge 3.3.Stefan Krah2013-01-261-0/+4
|\ \ \ | |/ /
| * | Adapt test_bytes for a build --without-doc-strings.Stefan Krah2013-01-261-0/+4
| | |
| * | (Merge 3.2) Issue #16218, #16414, #16444: Backport FS_NONASCII,Victor Stinner2013-01-031-0/+3
| |\ \ | | |/ | | | | | | | | | TESTFN_UNDECODABLE, TESTFN_NONASCII of test.support from Python 3.4. Backport tests on non-ASCII paths.
| | * Issue #16218, #16414, #16444: Backport FS_NONASCII, TESTFN_UNDECODABLE,Victor Stinner2013-01-031-0/+78
| | | | | | | | | | | | | | | TESTFN_NONASCII of test.support from Python 3.4. Backport tests on non-ASCII paths.
| * | Issue #16218, #16444: Backport improvment on tests for non-ASCII charactersVictor Stinner2012-11-121-0/+75
| | |
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-6/+6
| | |
* | | Issue #16717: get rid of socket.error, replace with OSErrorAndrew Svetlov2012-12-181-3/+3
| | |
* | | Issue #13390: New function :func:`sys.getallocatedblocks()` returns the ↵Antoine Pitrou2012-12-091-1/+1
| | | | | | | | | | | | | | | | | | number of memory blocks currently allocated. Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
* | | Issue #16444: test more bytes in support.TESTFN_UNDECODABLE to support more ↵Victor Stinner2012-12-041-0/+3
| | | | | | | | | | | | Windows code pages
* | | Issue #10966: Remove the concept of unexpected skipped tests.Brett Cannon2012-11-171-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The concept of what was unexpected was typically defined as "some depencendy wasn't installed", which isn't unexpected at all as it's totally optional. Since it confuses new contributors as they think something is wrong with their installation it seems sensible to get rid of the concept. This change also adds the concept of optional tests that are required to work on a specific platform(s) (e.g. test_winreg on Windows). This should help catch compile issues instead of a test being blindly skipped even when it should have run. The skipped test list in the future can also print out the reason for being skipped to make it more obvious as to why the skipping occurred.
* | | Issue #16444, #16218: Use TESTFN_UNDECODABLE on UNIXVictor Stinner2012-11-101-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | Check if data is decoded by os.fsdecode() (filesystem encoding with surrogateescape error handler, PEP 383), not by UTF-8 or the filesystem encoding in strict mode. Use TESTFN_UNDECODABLE in test_cmd_line_script.test_non_ascii() on UNIX.
* | | Issue #16414: Test more characters for support.FS_NONASCIIVictor Stinner2012-11-061-9/+26
| | | | | | | | | | | | | | | It should increase the probability of finding a non-ASCII character on any locale encoding.
* | | Issue #16414: Fix typo in support.TESTFN_NONASCII (useless space)Victor Stinner2012-11-061-1/+1
| | |
* | | Issue #16414: Fix support.TESTFN_UNDECODABLE and ↵Victor Stinner2012-11-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | test_genericpath.test_nonascii_abspath() * support.TESTFN_UNDECODABLE was decodable if the filesystem encoding was cp932 * test_genericpath.test_nonascii_abspath() didn't work on Windows if the path was not decodable (ex: with cp932)
* | | Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCIIVictor Stinner2012-11-061-0/+31
| | | | | | | | | | | | | | | These constants are used to test functions with non-ASCII data, especially filenames.
* | | Issue #15478: Fix again to fix test_os on WindowsVictor Stinner2012-10-311-1/+1
| | |
* | | Issue #15478: Raising an OSError doesn't decode or encode the filename anymoreVictor Stinner2012-10-301-0/+11
|/ / | | | | | | | | | | | | Pass the original filename argument to OSError constructor, instead of trying to encode it to or decode it from the filesystem encoding. This change avoids an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded from the filesystem encoding (ANSI code page).
* | compare singletons by identity not equality (closes #16712)Benjamin Peterson2012-10-091-1/+1
| | | | | | | | Patch from Serhiy Storchaka.
* | #15304: merge with 3.2.Ezio Melotti2012-09-211-1/+1
|\ \ | |/
| * #15304: fix wrong warning message in test.support.temp_cwd().Ezio Melotti2012-09-211-1/+1
| |
* | Merge 3.2Brian Curtin2012-08-131-2/+66
|\ \ | |/
| * Fix #15496. Add directory removal helpers to make Windows tests more ↵Brian Curtin2012-08-131-2/+66
| | | | | | | | reliable. Patch by Jeremy Kloth
* | Issue #15467: Merge 3.2Martin v. Löwis2012-07-291-0/+28
|\ \ | |/
| * Issue #15467: Move helpers for __sizeof__ tests into test_support.Martin v. Löwis2012-07-291-0/+28
| | | | | | | | Patch by Serhiy Storchaka.
* | #15277: Fix a resource leak in support.py when IPv6 is disabled.Ross Lagerwall2012-07-071-3/+5
| | | | | | | | | | | | | | | | The leak occurred by setting: echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 before running test_support. Patch by Brian Brazil.
* | Issue #14626: Large refactoring of functions / parameters in the os module.Larry Hastings2012-06-221-2/+2
| | | | | | | | | | | | | | | | | | Many functions now support "dir_fd" and "follow_symlinks" parameters; some also support accepting an open file descriptor in place of of a path string. Added os.support_* collections as LBYL helpers. Removed many functions only previously seen in 3.3 alpha releases (often starting with "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka; implemented by Larry Hastings.
* | Issue #13841: Make child processes exit using sys.exit() on WindowsRichard Oudkerk2012-06-141-1/+1
| |
* | #14885: Make support.skip_unless_xattr check also tempfileHynek Schlawack2012-05-231-10/+18
| | | | | | | | | | | | | | | | | | There is a rare edge case where the filesystem used by the tempfile functions (usually /tmp) doesn't support xattrs while the one used by TESTFN (the current directory, so likely to be below /home) does. This causes the xattr related test_shutil tests fail. skip_unless_xattr now checks both. I have also added skip_unless_xattr to __all__ where it has been missing.
* | Move private function _args_from_interpreter_flags() to subprocess.py, soAntoine Pitrou2012-05-181-2/+1
| | | | | | | | | | that it can be imported when threads are disabled. (followup to issue #12098)
* | #12098: Make multiprocessing's child processes inherit sys.flags on WindowsRichard Oudkerk2012-05-181-18/+2
| | | | | | | | Initial patch by Sergey Mezentsev.