summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError isAntoine Pitrou2011-11-211-3/+74
| | | | | | | raised when the wrapped raw file is non-blocking and the write would block. Previous code assumed that the raw write() would raise BlockingIOError, but RawIOBase.write() is defined to returned None when the call would block. Patch by sbt.
* Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycleCharles-François Natali2011-10-061-0/+15
| | | | | would be finalized after the reference to its underlying BufferedRWPair's writer got cleared by the GC.
* Issue #12213: Fix a buffering bug with interleaved reads and writes thatAntoine Pitrou2011-08-201-2/+43
| | | | could appear on io.BufferedRandom streams.
* Issue #12149: Update the method cache after a type's dictionnary getsAntoine Pitrou2011-07-121-1/+18
| | | | | | | | | cleared by the garbage collector. This fixes a segfault when an instance and its type get caught in a reference cycle, and the instance's deallocator calls one of the methods on the type (e.g. when subclassing IOBase). Diagnosis and patch by Davide Rizzo.
* test_io: make quiet the DeprecationWarning('classic int division')Victor Stinner2011-07-051-1/+1
|
* Issue #12429: Skip interrupted write tests on FreeBSD <= 7Victor Stinner2011-07-041-0/+2
| | | | On FreeBSD, the SIGALRM signal is sometimes received by the reader thread.
* Issue #12175: RawIOBase.readall() now returns None if read() returns None.Victor Stinner2011-05-251-2/+5
|
* Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError ifVictor Stinner2011-05-251-0/+2
| | | | the file is closed.
* Issue #12062: In the `io` module, fix a flushing bug when doing a certainAntoine Pitrou2011-05-121-0/+26
| | | | | | type of I/O sequence on a file opened in read+write mode (namely: reading, seeking a bit forward, writing, then seeking before the previous write but still within buffered data, and writing again).
* Merged revisions 88610 via svnmerge fromAntoine Pitrou2011-02-251-1/+94
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88610 | antoine.pitrou | 2011-02-25 22:24:11 +0100 (ven., 25 févr. 2011) | 4 lines Issue #10956: Buffered I/O classes retry reading or writing after a signal has arrived and the handler returned successfully. ........
* Merged revisions 87427 via svnmerge fromAntoine Pitrou2010-12-211-0/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87427 | antoine.pitrou | 2010-12-21 22:20:59 +0100 (mar., 21 déc. 2010) | 3 lines Issue #10750: The `raw` attribute of buffered IO objects is now read-only. ........
* Merged revisions 86981,86984 via svnmerge fromAntoine Pitrou2010-12-031-0/+38
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86981 | antoine.pitrou | 2010-12-03 19:41:39 +0100 (ven., 03 déc. 2010) | 5 lines Issue #10478: Reentrant calls inside buffered IO objects (for example by way of a signal handler) now raise a RuntimeError instead of freezing the current process. ........ r86984 | antoine.pitrou | 2010-12-03 20:14:17 +0100 (ven., 03 déc. 2010) | 3 lines Add an "advanced topics" section to the io doc. ........
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-164/+164
| | | | | | | | | | 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 85482 via svnmerge fromAntoine Pitrou2010-10-141-0/+2
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85482 | antoine.pitrou | 2010-10-14 17:34:31 +0200 (jeu., 14 oct. 2010) | 4 lines Replace the "compiler" resource with the more generic "cpu", so as to mark CPU-heavy tests. ........
* Merged revisions 84814 via svnmerge fromAntoine Pitrou2010-09-141-10/+34
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84814 | antoine.pitrou | 2010-09-14 20:37:24 +0200 (mar., 14 sept. 2010) | 4 lines Issue #9854: The default read() implementation in io.RawIOBase now handles non-blocking readinto() returning None correctly. ........
* Silence warning about 1/0Florent Xicluna2010-09-131-1/+1
|
* Merged revisions 84239 via svnmerge fromAntoine Pitrou2010-08-211-0/+72
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84239 | antoine.pitrou | 2010-08-21 21:09:32 +0200 (sam., 21 août 2010) | 4 lines Issue #9617: Signals received during a low-level write operation aren't ignored by the buffered IO layer anymore. ........
* Merged revisions 83944 via svnmerge fromAntoine Pitrou2010-08-111-0/+24
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83944 | antoine.pitrou | 2010-08-11 15:31:33 +0200 (mer., 11 août 2010) | 6 lines Issue #9550: a BufferedReader could issue an additional read when the original read request had been satisfied, which can block indefinitely when the underlying raw IO channel is e.g. a socket. Report and original patch by Jason V. Miller. ........
* Issue #6213: Implement getstate() and setstate() methods of utf-8-sig andVictor Stinner2010-07-281-2/+0
| | | | utf-16 incremental encoders.
* Issue #7865: The close() method of :mod:`io` objects should not swallowAntoine Pitrou2010-05-031-0/+44
| | | | | exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon.
* Issue #7449, last part (11): fix many tests if thread support is disabledVictor Stinner2010-04-271-2/+7
| | | | | | * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads
* Revert temporary commit in r79937Antoine Pitrou2010-04-101-41/+0
|
* Temporary commit of fix to issue #5380 (in order to watch buildbot response)Antoine Pitrou2010-04-101-0/+41
|
* Replace catch_warnings with check_warnings when it makes sense. Use ↵Florent Xicluna2010-03-311-1/+0
| | | | assertRaises context manager to simplify some tests.
* Cleanup some test cases using check_warnings and check_py3k_warnings.Florent Xicluna2010-03-171-14/+4
|
* Remove unused imports in test modules.Georg Brandl2010-02-071-2/+1
|
* #7092: Silence more py3k warnings. Patch by Florent Xicluna.Ezio Melotti2010-02-031-2/+2
|
* - Issue #6939: Fix file I/O objects in the `io` module to keep the originalAntoine Pitrou2010-01-311-3/+17
| | | | | | 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.
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-16/+16
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-2/+2
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-2/+2
| | | | Patch by flox
* accept None as the same as having passed no argument in file types #7349Benjamin Peterson2009-12-131-4/+32
| | | | | | | 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.
* #6750: TextIOWrapped could duplicate output when several threads write to it.Amaury Forgeot d'Arc2009-08-291-0/+21
| | | | this affect text files opened with io.open(), and the print() function of py3k
* Issue #6629: Fix a data corruption issue in the new `io` package, which couldAntoine Pitrou2009-08-061-0/+20
| | | | | | | | occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or "wb+" mode) after having buffered a certain amount of data for reading. This bug was not present in the pure Python implementation. Yes, this is a serious issue.
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-13/+13
|
* Issue #6215: Fixed to use self.open() instead of open() or io.open().Hirokazu Yamamoto2009-06-171-18/+18
|
* Issue #6215: backport the 3.1 io libAntoine Pitrou2009-06-121-488/+1508
|
* handle SEEK_ constants in test_ioBenjamin Peterson2009-04-021-4/+4
|
* Issue #5008: When a file is opened in append mode with the new IO library,Antoine Pitrou2009-01-211-0/+11
| | | | | | do an explicit seek to the end of file (so that e.g. tell() returns the file size rather than 0). This is consistent with the behaviour of the traditional 2.x file object.
* #4736 BufferRWPair.closed shouldn't try to call another property as a functionBenjamin Peterson2008-12-241-1/+2
|
* Backport r67759 (fix io.IncrementalNewlineDecoder for UTF-16 et al.).Antoine Pitrou2008-12-141-41/+73
|
* backport r67325: make FileIO.mode always contain 'b'Benjamin Peterson2008-11-221-7/+7
|
* Fixed issue #4233.Amaury Forgeot d'Arc2008-11-201-0/+24
| | | | | | | | | | Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The FileIO object also got a new readonly attribute closefd. Approved by Barry Backport of r67106 from the py3k branch
* backport r67300Benjamin Peterson2008-11-201-0/+31
|
* move a FileIO test to test_fileioBenjamin Peterson2008-11-031-7/+0
|
* Issue #4237: io.FileIO() was raising invalid warnings caused by insufficient ↵Christian Heimes2008-10-301-0/+7
| | | | initialization of PyFileIOObject struct members.
* build_os2emx.patch in issue 3868 - update OS/2 EMX makefile and config filesAndrew MacIntyre2008-09-221-1/+1
| | | | | | | | Part of source_os2emx.patch in issue 3868: Include/pystrcmp.h: OS/2 has same C APIs as Windows Lib/test/test_io.py: OS/2 has same behaviour as Windows for this test Reviewed by Amaury Forgeot d'Arc
* Issue #3476: make BufferedReader and BufferedWriter thread-safeAntoine Pitrou2008-08-141-1/+78
|
* Backport fast alternate io.BytesIO implementation.Alexandre Vassalotti2008-05-091-3/+5
| | | | | Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844, r62846, r62952, r62956.
* In test_io, StatefulIncrementalDecoderTest was not part of the test suite.Amaury Forgeot d'Arc2008-05-031-6/+6
| | | | | | | | | And of course, the test failed: a bytearray was used without reason in io.TextIOWrapper.tell(). The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes, whereas bytearrays yield integers. This code should still work with python3.0