summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235)Oren Milman2017-08-291-0/+20
|
* [2.7] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-191-0/+16
| | | | | | | | | (GH-1096) (GH-1180) (#1183) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86) (cherry picked from commit 680fea4)
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-0/+1
| | | | | | present (#1152)
* Issue #23908: os functions, open() and the io.FileIO constructor now rejectSerhiy Storchaka2016-07-011-0/+9
| | | | | unicode paths with embedded null character on Windows instead of silently truncate them.
* Issue #20699: Document that “io” methods should accept memoryviewMartin Panter2016-06-031-8/+31
| | | | | | This matches the usage by BufferedReader, BufferedWriter, etc. Also document and test that the write() methods should only access their argument before they return.
* Issue #22854: fileno() is always required in IOBase; remove testMartin Panter2016-03-311-6/+0
| | | | | Also change BufferedReader.writable() and BufferedWriter.readable() to always return False.
* Issue #25523: Backported a-to-an corrections.Serhiy Storchaka2015-11-021-1/+1
|
* Issue #20557: Use specific asserts in io tests.Serhiy Storchaka2015-08-021-10/+10
|
* Issue #19543: Emit deprecation warning for known non-text encodings.Serhiy Storchaka2015-05-311-6/+37
| | | | | | | | | | Backported issues #19619: encode() and decode() methods and constructors of str, unicode and bytearray classes now emit deprecation warning for known non-text encodings when Python is ran with the -3 option. Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the internal codec marking system added to emit deprecation warning for known non-text encodings at stream construction time when Python is ran with the -3 option.
* Backported tests from issue #20175.Serhiy Storchaka2015-04-161-0/+11
|
* Issue #23799: Added test.test_support.start_threads() for running andSerhiy Storchaka2015-04-011-20/+12
| | | | cleaning up multiple threads.
* Make some tests more frienly to MemoryError.Serhiy Storchaka2015-03-281-4/+10
| | | | Free memory, unlock hanging threads.
* Issue #21802: The reader in BufferedRWPair now is closed even when closingSerhiy Storchaka2015-03-241-0/+45
| | | | writer failed in BufferedRWPair.close().
* Broke reference loops in tests added in issue #5700.Serhiy Storchaka2015-02-221-0/+3
|
* Issue #5700: io.FileIO() called flush() after closing the file.Serhiy Storchaka2015-02-201-2/+48
| | | | flush() was not called in close() if closefd=False.
* allow more operations to work on detached streams (closes #23093)Benjamin Peterson2014-12-221-0/+14
| | | | Patch by Martin Panter.
* clear BufferedRWPair weakrefs on deallocation (closes #22517)Benjamin Peterson2014-09-301-0/+6
|
* Issue #21310: Fixed possible resource leak in failed open().Serhiy Storchaka2014-06-091-0/+15
|
* Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.Serhiy Storchaka2014-02-121-0/+38
| | | | Based on patch by Stephen Tu.
* Issue #19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-101-8/+4
|
* Issue #17835: Fix test_io when the default OS pipe buffer size is larger ↵Antoine Pitrou2013-04-241-2/+2
| | | | than one million bytes.
* Use a larger amount of data for the interrupted_write tests so thatGregory P. Smith2013-03-201-1/+1
| | | | they work properly on systems configured with large pipe buffers.
* #17275: Fix class name in init errors in C bufferedio classes.R David Murray2013-02-241-0/+18
| | | | | | This fixes an apparent copy-and-paste error. Original patch by Manuel Jacob.
* Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlyingSerhiy Storchaka2013-02-031-1/+39
| | | | | stream or a decoder produces data of an unexpected type (i.e. when io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
* call close on the underlying stream even if flush raises (#16597)Benjamin Peterson2012-12-201-0/+27
|
* Also add tests for TextIOWrapper.writelines() (issue #15744).Antoine Pitrou2012-10-161-0/+22
|
* Add tests for the writelines() method of file objects.Antoine Pitrou2012-10-161-0/+23
| | | | Original patch by Felipe Cruz.
* Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.Antoine Pitrou2012-07-291-4/+18
| | | | Patch by Serhiy Storchaka.
* #4841: Fix FileIO constructor to honor closefd when called repeatedlyHynek Schlawack2012-05-251-0/+13
| | | | Patch by Victor Stinner.
* 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