Commit Graph

16 Commits

Author SHA1 Message Date
Ezio Melotti 187f93d986 Use "x in y" instead of y.find(x) != -1. 2010-03-17 14:22:34 +00:00
Florent Xicluna 6de9e938a5 Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
effectively raised.  A new utility ``check_py3k_warnings`` deals with py3k warnings.
2010-03-07 12:18:33 +00:00
Georg Brandl a4f46e1292 Remove unused imports in test modules. 2010-02-07 17:03:15 +00:00
Antoine Pitrou f3fa074703 - Issue #6939: Fix file I/O objects in the `io` module to keep the original
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.
2010-01-31 22:26:04 +00:00
Benjamin Peterson ddd392cbb9 accept None as the same as having passed no argument in file types #7349
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.
2009-12-13 19:19:07 +00:00
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Antoine Pitrou 1969059327 Issue #6215: backport the 3.1 io lib 2009-06-12 20:14:08 +00:00
Antoine Pitrou f3bd687b2d Issue #3877: skip a test_fileio subtest on all BSDs, not only FreeBSD 2009-05-23 16:32:32 +00:00
Benjamin Peterson 5539c78391 make bad file descriptor tests more robust 2009-01-19 17:37:42 +00:00
Benjamin Peterson 5848d1ff35 raise an OSError for invalid fds #4991 2009-01-19 00:08:08 +00:00
Benjamin Peterson 7af65568ff #4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms 2008-12-29 17:56:58 +00:00
Benjamin Peterson bfc51567f5 backport r67325: make FileIO.mode always contain 'b' 2008-11-22 01:59:15 +00:00
Benjamin Peterson 81e92e582e move a FileIO test to test_fileio 2008-11-03 22:34:57 +00:00
Benjamin Peterson f22c26ecf4 #3703 unhelpful _fileio.FileIO error message when trying to open a directory
Reviewer: Gregory P. Smith
2008-09-01 14:13:43 +00:00
Neal Norwitz 901e4715bd #3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
2008-08-24 22:03:05 +00:00
Benjamin Peterson 0e3a6cf2cb backport test_fileio 2008-07-18 14:14:41 +00:00