Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-18174: Fix file descriptor leaks in tests (GH-7408) | Victor Stinner | 2018-06-04 | 1 | -0/+1 |
| | | | | | | | | * test_tempfile.test_no_leak_fd() mocks os.close() but it doesn't call the original os.close() method and so leaks an open file descriptor. Fix the test by calling the original os.close() function. * test_posix.test_fdopen_directory(): close the directory file descriptor when the test completes. | ||||
* | [2.7] bpo-31160: Backport reap_children fixes from master to 2.7 (#3063) | Victor Stinner | 2017-08-10 | 1 | -0/+7 |
| | | | | | | | | | | | | | | * bpo-31160: regrtest now reaps child processes (#3044) Add a post_test_cleanup() function which currently only calls support.reap_children(). (cherry picked from commit e3510d74aacc477c30f42f2b941d69689bbc478e) * bpo-31160: test_tempfile: Fix reap_children() warning (#3056) TestRandomNameSequence.test_process_awareness() now calls os.waitpid() to avoid leaking a zombie process. (cherry picked from commit 6c8c2943d996b59a48d331f61f22cbe72933910e) | ||||
* | [2.7] bpo-30197: Enhance swap_attr() and backport swap_item() in ↵ | Serhiy Storchaka | 2017-04-28 | 1 | -3/+2 |
| | | | | | | test.test_support. (#1341) (#1347) (cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83) | ||||
* | Issue #26385: Cleanup NamedTemporaryFile if fdopen() fails, by SilentGhost | Martin Panter | 2016-02-29 | 1 | -0/+7 |
| | |||||
* | Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again | Serhiy Storchaka | 2015-05-19 | 1 | -6/+44 |
| | | | | | | 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 #21058: Fix a leak of file descriptor in tempfile.NamedTemporaryFile(), | Victor Stinner | 2014-03-25 | 1 | -0/+18 |
| | | | | close the file descriptor if os.fdopen() fails | ||||
* | Issue #19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-10 | 1 | -8/+4 |
| | |||||
* | Close #18945: Add tests for tempfile name collision handling. | Eli Bendersky | 2013-09-15 | 1 | -22/+65 |
| | | | | Patch by Vlad Shcherbina | ||||
* | Close #18849: Fixed a Windows-specific tempfile bug where collision with an | Eli Bendersky | 2013-09-06 | 1 | -0/+26 |
| | | | | | existing directory caused mkstemp and related APIs to fail instead of retrying. Report and fix by Vlad Shcherbina. | ||||
* | Issue #16800: tempfile.gettempdir() no longer left temporary files when | Serhiy Storchaka | 2013-02-12 | 1 | -5/+51 |
| | | | | the disk is full. Original patch by Amir Szekely. | ||||
* | Issue #10355: SpooledTemporaryFile properties and xreadline method now work ↵ | Serhiy Storchaka | 2013-02-09 | 1 | -0/+31 |
| | | | | for unrolled files. | ||||
* | Issue #12856: Ensure child processes do not inherit the parent's random seed ↵ | Antoine Pitrou | 2011-11-25 | 1 | -0/+32 |
| | | | | | | for filename generation in the tempfile module. Patch by Brian Harring. | ||||
* | Port #11488 patch from 3.1 (changeset f816841bab03) | R David Murray | 2011-03-14 | 1 | -0/+17 |
| | |||||
* | In a number of places code still revers | Ronald Oussoren | 2010-05-05 | 1 | -5/+3 |
| | | | | | | | | | to "sys.platform == 'mac'" and that is dead code because it refers to a platform that is no longer supported (and hasn't been supported for several releases). Fixes issue #7908 for the trunk. | ||||
* | Remove unused imports in test modules. | Georg Brandl | 2010-02-07 | 1 | -1/+0 |
| | |||||
* | Fix various missing import/unbound name errors. | Georg Brandl | 2010-02-06 | 1 | -1/+1 |
| | |||||
* | use assert[Not]IsInstance where appropriate | Ezio Melotti | 2010-01-24 | 1 | -4/+3 |
| | |||||
* | use assert[Not]In where appropriate | Ezio Melotti | 2010-01-23 | 1 | -3/+3 |
| | |||||
* | convert usage of fail* to assert* | Benjamin Peterson | 2009-06-30 | 1 | -55/+55 |
| | |||||
* | Make test.test_support.EnvironmentVarGuard behave like a dictionary. | Walter Dörwald | 2009-05-01 | 1 | -1/+1 |
| | | | | | All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block. | ||||
* | Use test.test_support.EnvironmentVarGuard where tests change environment vars. | Walter Dörwald | 2009-04-26 | 1 | -7/+2 |
| | |||||
* | remove test_support.TestSkipped and just use unittest.SkipTest | Benjamin Peterson | 2009-03-26 | 1 | -4/+4 |
| | |||||
* | Remove some from __future__ import with_statements | Benjamin Peterson | 2008-04-30 | 1 | -1/+0 |
| | |||||
* | Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as ↵ | Nick Coghlan | 2008-02-09 | 1 | -3/+65 |
| | | | | context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5) | ||||
* | This is probably what was meant here. | Armin Rigo | 2007-12-07 | 1 | -1/+1 |
| | |||||
* | Patch #1630118: add a SpooledTemporaryFile class to tempfile. | Collin Winter | 2007-03-19 | 1 | -1/+103 |
| | |||||
* | Fix a tab. | Georg Brandl | 2007-03-13 | 1 | -2/+2 |
| | |||||
* | Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter | Georg Brandl | 2007-03-13 | 1 | -2/+19 |
| | | | | | which can be set to False to prevent the default delete-on-close behavior. | ||||
* | Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34]. | Neal Norwitz | 2006-09-05 | 1 | -1/+1 |
| | |||||
* | Normalized a few cases of whitespace in function declarations. | Martin Blais | 2006-06-06 | 1 | -1/+1 |
| | | | | | | | | | | | | Found them using:: find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done (I was doing this all over my own code anyway, because I'd been using spaces in all defs, so I thought I'd make a run on the Python code as well. If you need to do such fixes in your own code, you can use xx-rename or parenregu.el within emacs.) | ||||
* | Exceedingly minor tweak. | Michael W. Hudson | 2005-02-15 | 1 | -1/+1 |
| | |||||
* | Patch #1026986: Add OpenBSD 3.5 and 3.6 to list of broken systems. | Martin v. Löwis | 2004-09-15 | 1 | -0/+2 |
| | |||||
* | When /tmp has certain sticky bits set, newly created subdirectories | Guido van Rossum | 2004-03-31 | 1 | -0/+1 |
| | | | | | inherit those bits, causing the test_mkdtemp.test_mode() test to fail. Remove those before comparing the actual mode to the expected mode. | ||||
* | Patch #813200: Quote executable path on Windows. Fixes #811082. | Martin v. Löwis | 2003-10-23 | 1 | -2/+10 |
| | | | | Backported to 2.3. | ||||
* | Patch #810914: Return absolute path for mkstemp. Fixes #810408. | Martin v. Löwis | 2003-10-12 | 1 | -1/+7 |
| | | | | | This should not be backported to 2.3, as it might break backwards compatibility. | ||||
* | Combine the functionality of test_support.run_unittest() | Walter Dörwald | 2003-05-01 | 1 | -4/+1 |
| | | | | | | | | | | 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. | ||||
* | Added the Mac to platforms that don't have user/group/other modes. | Jack Jansen | 2003-01-08 | 1 | -3/+6 |
| | | | | Set the limit for the number of open files to 32 if platform==mac. | ||||
* | Two bugs: | Fred Drake | 2002-11-22 | 1 | -7/+7 |
| | | | | | - assertRaises() wasn't being called correctly - test_warning() no longer applies | ||||
* | Don't call warnings.resetwarnings(); that does bad things that cause | Fred Drake | 2002-10-17 | 1 | -5/+4 |
| | | | | | | other tests to generate warning when they didn't before. In particular, this cancels not only filters set by -W, but also from test.regrtest. | ||||
* | Standardize behavior: no docstrings in test functions. Also get rid | Guido van Rossum | 2002-08-22 | 1 | -42/+37 |
| | | | | | | of dummy_test_TemporaryFile class; when NamedTemporaryFile and TemporaryFile are the same, simply don't add a test suite for TemporaryFile. | ||||
* | OS/2 EMX behaves like Windows where file permissions are concerned | Andrew MacIntyre | 2002-08-18 | 1 | -2/+2 |
| | |||||
* | Get rid of _once(); inlining it takes less code. :-) | Guido van Rossum | 2002-08-17 | 1 | -61/+0 |
| | | | | | | | Also, don't call gettempdir() in the default expression for the 'dir' argument to various functions; use 'dir=None' for the default and insert 'if dir is None: dir = gettemptir()' in the bodies. That way the work done by gettempdir is postponed until needed. | ||||
* | Patch by Zack W to make test_noinherit() more robust: spawn a Python | Guido van Rossum | 2002-08-17 | 1 | -28/+23 |
| | | | | | subprocess that does the right checks. This now works on Windows as well. | ||||
* | Drop the number of test files to 100 for all the tests | Neal Norwitz | 2002-08-16 | 1 | -4/+8 |
| | |||||
* | test_many(): open only 100 temp files, not 1000. Some systems don't | Guido van Rossum | 2002-08-14 | 1 | -1/+1 |
| | | | | | allow that many open files per process. I don't see that 1000 makes any difference for the test. | ||||
* | There's no distinction among 'user', 'group' and 'world' permissions | Tim Peters | 2002-08-09 | 1 | -2/+14 |
| | | | | | on Win32, so tests that assume there are such distinctions can't pass. Fiddled them to work. | ||||
* | Whitespace normalization. | Tim Peters | 2002-08-09 | 1 | -2/+2 |
| | |||||
* | Check-in of the most essential parts of SF 589982 (tempfile.py | Guido van Rossum | 2002-08-09 | 1 | -7/+704 |
| | | | | | | | | rewrite, by Zack Weinberg). This replaces most code in tempfile.py (please review!!!) and adds extensive unit tests for it. This will cause some warnings in the test suite; I'll check those in soon, and also the docs. | ||||
* | SF bug #476138: tempfile behavior across platforms | Tim Peters | 2001-10-29 | 1 | -0/+10 |
Ensure that a tempfile can be closed any number of times without error. This wasn't true on Windows. |