summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileio.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28016: Skip /dev/tty seekable() test on AIXMartin Panter2016-11-141-1/+1
|
* Issue #23908: os functions, open() and the io.FileIO constructor now rejectSerhiy Storchaka2016-07-011-0/+5
| | | | | unicode paths with embedded null character on Windows instead of silently truncate them.
* Issue #20557: Use specific asserts in io tests.Serhiy Storchaka2015-08-021-3/+3
|
* Backported tests from issue #20175.Serhiy Storchaka2015-04-161-3/+12
|
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-2/+5
|
* Issue #19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-101-21/+21
|
* Issue #18876: The FileIO.mode attribute now better reflects the actual mode ↵Antoine Pitrou2013-09-041-1/+16
| | | | | | under which the file was opened. Patch by Erik Bray.
* Issue #17111: Prevent test_surrogates (test_fileio) failure on OS X 10.4.Ned Deily2013-02-121-2/+3
| | | | | | | | | | | | An odd bug in OS X 10.4 causes open(2) on a non-existent, invalid-encoded filename to return errno 22, EINVAL: Invalid argument, instead of the expected errno 2, ENOENT: No such file or directory, *if* the containing directory is not empty. That caused frequent failures when running the buildbot tests on 10.4 depending on the state of the test working directory. The failure is easy to reproduce on 10.4 by running the test directly (not with regrtest), first in an empty directory, then after adding a file to it. The fix is to check for and pass if either errno is returned.
* Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-0/+4
| | | | | | | when result of PyInt_AsLong() or PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
* Add tests for the writelines() method of file objects.Antoine Pitrou2012-10-161-0/+21
| | | | Original patch by Felipe Cruz.
* Issue #15247: FileIO now raises an error when given a file descriptor ↵Antoine Pitrou2012-07-061-0/+8
| | | | pointing to a directory.
* #10053: Don't close FDs when FileIO.__init__ failsHynek Schlawack2012-06-211-0/+11
| | | | Loosely based on the work by Hirokazu Yamamoto.
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-31/+31
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Merged revisions 85982 via svnmerge fromAntoine Pitrou2010-10-311-0/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85982 | antoine.pitrou | 2010-10-30 18:19:14 +0200 (sam., 30 oct. 2010) | 4 lines Issue #10253: FileIO leaks a file descriptor when trying to open a file for append that isn't seekable. Patch by Brian Brazil. ........
* Merged revisions 86000 via svnmerge fromBrian Curtin2010-10-311-1/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86000 | brian.curtin | 2010-10-30 18:56:45 -0500 (Sat, 30 Oct 2010) | 2 lines Fix ResourceWarning about unclosed file ........
* Merged revisions 84506 via svnmerge fromAntoine Pitrou2010-09-041-0/+3
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84506 | antoine.pitrou | 2010-09-04 22:53:29 +0200 (sam., 04 sept. 2010) | 5 lines Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file descriptor is provided. Patch by Pascal Chambon. ........
* Issue #8438: Remove reference to the missing "surrogateescape" encodingAntoine Pitrou2010-04-191-0/+20
| | | | error handler from the new IO library.
* Use "x in y" instead of y.find(x) != -1.Ezio Melotti2010-03-171-1/+1
|
* Issue #7849: Now the utility ``check_warnings`` verifies if the warnings areFlorent Xicluna2010-03-071-1/+1
| | | | effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
* Remove unused imports in test modules.Georg Brandl2010-02-071-2/+1
|
* - Issue #6939: Fix file I/O objects in the `io` module to keep the originalAntoine Pitrou2010-01-311-0/+11
| | | | | | file position when calling `truncate()`. It would previously change the file position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon.
* accept None as the same as having passed no argument in file types #7349Benjamin Peterson2009-12-131-0/+9
| | | | | | | This is for consistency with imitation file objects like StringIO and BytesIO. This commit also adds a few tests, where they were lacking for concerned methods.
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-6/+6
|
* Issue #6215: backport the 3.1 io libAntoine Pitrou2009-06-121-31/+154
|
* Issue #3877: skip a test_fileio subtest on all BSDs, not only FreeBSDAntoine Pitrou2009-05-231-1/+1
|
* make bad file descriptor tests more robustBenjamin Peterson2009-01-191-2/+3
|
* raise an OSError for invalid fds #4991Benjamin Peterson2009-01-191-0/+4
|
* #4764 in io.open, set IOError.filename when trying to open a directory on ↵Benjamin Peterson2008-12-291-0/+1
| | | | POSIX platforms
* backport r67325: make FileIO.mode always contain 'b'Benjamin Peterson2008-11-221-2/+2
|
* move a FileIO test to test_fileioBenjamin Peterson2008-11-031-1/+9
|
* #3703 unhelpful _fileio.FileIO error message when trying to open a directoryBenjamin Peterson2008-09-011-0/+11
| | | | Reviewer: Gregory P. Smith
* #3662: Fix segfault introduced when fixing memory leaks.Neal Norwitz2008-08-241-0/+4
| | | | | TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio R (approach from bug)=Amaury and Benjamin
* backport test_fileioBenjamin Peterson2008-07-181-0/+240