summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tempfile.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. ↵Serhiy Storchaka2017-04-281-3/+2
| | | | | | | | | | | | | (#1341) * bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. They now work when delete replaced attribute or item inside the with statement. The old value of the attribute or item (or None if it doesn't exist) now will be assigned to the target of the "as" clause, if there is one. * Update docstrings.
* bpo-30030: Revert f50354ad (tempfile) (#1187)Victor Stinner2017-04-191-3/+2
| | | | Revert f50354adaaafebe95ad09d09b825804a686ea843: it introduced a regression in test_threadedtempfile.
* Reimplement tempfile._RandomNameSequence using a generator function. (#1075)Serhiy Storchaka2017-04-111-2/+3
|
* Issue #26385: Cleanup NamedTemporaryFile if open() fails, by SilentGhostMartin Panter2016-02-281-1/+9
|
* Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dirGregory P. Smith2015-05-221-21/+148
| | | | parameters and returns bytes in such situations (matching the os module APIs).
* Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try againSerhiy Storchaka2015-05-191-6/+41
|\ | | | | | | | | | | when a directory with the chosen name already exists on Windows as well as on Unix. tempfile.mkstemp() now fails early if parent directory is not valid (not exists or is a file) on Windows.
| * Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try againSerhiy Storchaka2015-05-191-6/+41
| | | | | | | | | | | | when a directory with the chosen name already exists on Windows as well as on Unix. tempfile.mkstemp() now fails early if parent directory is not valid (not exists or is a file) on Windows.
* | Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-1/+2
| | | | | | | | Patch by Christie Wilson.
* | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-4/+1
|/ | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* Issue #23700: Iterator of NamedTemporaryFile now keeps a reference toSerhiy Storchaka2015-03-191-0/+13
| | | | NamedTemporaryFile instance. Patch by Bohuslav Kabrda.
* Issue #22427: TemporaryDirectory no longer attempts to clean up twice whenSerhiy Storchaka2014-09-241-0/+24
| | | | used in the with statement in generator.
* Issue #18174: Fix leak of file descriptor in test_tempfileVictor Stinner2014-07-281-0/+4
|
* Issue #21058: fix typo in a comment. Patch written by Vajrasky Kok.Victor Stinner2014-03-251-1/+1
|
* Issue #21058: Fix a leak of file descriptor in tempfile.NamedTemporaryFile(),Victor Stinner2014-03-251-0/+24
| | | | close the file descriptor if io.open() fails
* Issue #19077: tempfile.TemporaryDirectory cleanup no longer fails whenSerhiy Storchaka2014-01-271-47/+39
|\ | | | | | | | | called during shutdown. Emitting resource warning in __del__ no longer fails. Original patch by Antoine Pitrou.
| * Issue #19077: tempfile.TemporaryDirectory cleanup is now most likelySerhiy Storchaka2014-01-271-47/+37
| | | | | | | | | | | | successful when called during nulling out of modules during shutdown. Misleading exception no longer raised when resource warning is emitted during shutdown.
* | Issue #18879: When a method is looked up on a temporary file, avoid closing ↵Antoine Pitrou2013-12-211-0/+17
|\ \ | |/ | | | | the file before the method is possibly called.
| * Issue #18879: When a method is looked up on a temporary file, avoid closing ↵Antoine Pitrou2013-12-211-0/+17
| | | | | | | | the file before the method is possibly called.
* | Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-8/+4
|\ \ | |/
| * Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-8/+4
| |
* | Issue14255 Don't flatten case of tempdirTim Golden2013-10-251-0/+14
| |
* | Issue #18945: Add tests for tempfile name collision handling.Eli Bendersky2013-09-131-22/+65
|\ \ | |/ | | | | Patch by Vlad Shcherbina
| * Issue #18945: Add tests for tempfile name collision handling.Eli Bendersky2013-09-131-22/+65
| | | | | | | | Patch by Vlad Shcherbina
* | Issue #18849: Fixed a Windows-specific tempfile bug where collision with anEli Bendersky2013-09-061-0/+26
|\ \ | |/ | | | | | | existing directory caused mkstemp and related APIs to fail instead of retrying. Report and fix by Vlad Shcherbina.
| * Issue #18849: Fixed a Windows-specific tempfile bug where collision with anEli Bendersky2013-09-061-0/+26
| | | | | | | | | | existing directory caused mkstemp and related APIs to fail instead of retrying. Report and fix by Vlad Shcherbina.
* | Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-0/+1
| | | | | | | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* | Close #12015: The tempfile module now uses a suffix of 8 random charactersVictor Stinner2013-08-131-2/+2
| | | | | | | | | | | | instead of 6, to reduce the risk of filename collision. The entropy was reduced when uppercase letters were removed from the charset used to generate random characters.
* | Issue #16800: tempfile.gettempdir() no longer left temporary files whenSerhiy Storchaka2013-02-121-1/+39
|\ \ | |/ | | | | the disk is full. Original patch by Amir Szekely.
| * Issue #16800: tempfile.gettempdir() no longer left temporary files whenSerhiy Storchaka2013-02-121-1/+39
| |\ | | | | | | | | | the disk is full. Original patch by Amir Szekely.
| | * Issue #16800: tempfile.gettempdir() no longer left temporary files whenSerhiy Storchaka2013-02-121-2/+44
| | | | | | | | | | | | the disk is full. Original patch by Amir Szekely.
* | | Fix a test for SpooledTemporaryFile (added in issue #10355).Serhiy Storchaka2013-02-101-1/+1
|\ \ \ | |/ /
| * | Fix a test for SpooledTemporaryFile (added in issue #10355).Serhiy Storchaka2013-02-101-1/+1
| |\ \ | | |/
| | * Fix a test for SpooledTemporaryFile (added in issue #10355).Serhiy Storchaka2013-02-101-1/+1
| | |
* | | Issue #17169: Restore errno in tempfile exceptions.Serhiy Storchaka2013-02-091-1/+3
|\ \ \ | |/ /
| * | Issue #17169: Restore errno in tempfile exceptions.Serhiy Storchaka2013-02-091-1/+3
| | |
* | | Issue #10355: SpooledTemporaryFile properties now work for unrolled files.Serhiy Storchaka2013-02-091-0/+39
|\ \ \ | |/ / | | | | | | Remove obsoleted xreadline method.
| * | Issue #10355: SpooledTemporaryFile properties now work for unrolled files.Serhiy Storchaka2013-02-091-0/+39
| |\ \ | | |/ | | | | | | Remove obsoleted xreadline method.
| | * Issue #10355: SpooledTemporaryFile properties now work for unrolled files.Serhiy Storchaka2013-02-091-0/+39
| | | | | | | | | | | | Remove obsoleted xreadline method.
* | | Issue #16706: get rid of os.errorAndrew Svetlov2012-12-181-2/+2
| | |
* | | Get rig of EnvironmentError (#16705)Andrew Svetlov2012-12-171-1/+1
| | |
* | | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-3/+3
|/ /
* | PEP8-ize test namesAntoine Pitrou2012-03-101-82/+54
| |
* | Remove useless failOnException() methodAntoine Pitrou2012-03-101-86/+32
| |
* | Issue #12856: Ensure child processes do not inherit the parent's random seed ↵Antoine Pitrou2011-11-251-0/+32
|\ \ | |/ | | | | | | | | for filename generation in the tempfile module. Patch by Brian Harring.
| * Issue #12856: Ensure child processes do not inherit the parent's random seed ↵Antoine Pitrou2011-11-251-0/+32
| | | | | | | | | | | | for filename generation in the tempfile module. Patch by Brian Harring.
* | Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size ↵Antoine Pitrou2011-11-251-0/+21
| | | | | | | | | | | | parameter, as other file-like objects. Patch by Ryan Kelly.
* | Issue #12326: don't test the major version of sys.platformVictor Stinner2011-08-171-1/+1
|/ | | | | Use startswith, instead of ==, when testing sys.platform to support new platforms like Linux 3 or OpenBSD 5.
* Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow symlinks:Charles-François Natali2011-07-291-0/+21
| | | | fix it. Patch by Petri Lehtinen.
* Merge #11488 patch from 3.1.R David Murray2011-03-141-0/+17
|\
| * #11488: Add tests for writelines method of SpooledTemporaryFile.R David Murray2011-03-141-0/+17
| | | | | | | | Patch by Evan Dandrea.