summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_largefile.py
Commit message (Collapse)AuthorAgeFilesLines
* Raise statement normalization in Lib/test/.Collin Winter2007-08-291-4/+4
|
* More changes needed to make things work once bytes and str are truly divorced.Guido van Rossum2007-08-271-3/+3
|
* Fix test_largefile by changing some string literals to byte literals.Collin Winter2007-07-231-4/+4
|
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-9/+9
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-2/+2
| | | | (Rough first cut.)
* test_largefile can leave its temp file open if one of many tests fail. OnJason Tishler2003-08-261-73/+81
| | | | | | | | | | | | | | | | | | | | platforms (e.g., Cygwin) that are "particular" about open files, this will cause other regression tests that use the same temp file to fail: $ ./python.exe -E -tt Lib/test/regrtest.py -l test_largefile test_mmap test_mutants test_largefile test test_largefile failed -- got -1794967295L, but expected 2500000001L test_mmap test test_mmap crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' test_mutants test test_mutants crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' This patch solves the problem by adding missing "try/finally" blocks. Note that the "large" size of this patch is due to many white space changes -- otherwise, the patch is small. I tested this patch under Red Hat Linux 8.0 too.
* Require 'largefile' resource for Mac OSX as well.Guido van Rossum2002-12-021-5/+5
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Change Windows file.truncate() to (a) restore the original file position,Tim Peters2002-03-121-9/+15
| | | | | | | | | | | | and (b) stop trying to prevent file growth. Beef up the file.truncate() docs. Change test_largefile.py to stop assuming that f.truncate() moves the file pointer to the truncation point, and to verify instead that it leaves the file position alone. Remove the test for what happens when a specified size exceeds the original file size (it's ill-defined, according to the Single Unix Spec).
* file_truncate(): provide full "large file" support on Windows, byTim Peters2002-03-111-15/+24
| | | | | | | | | | | | | | | | | | | | dropping MS's inadequate _chsize() function. This was inspired by SF patch 498109 ("fileobject truncate support for win32"), which I rejected. libstdtypes.tex: Someone who knows should update the availability blurb. For example, if it's available on Linux, it would be good to say so. test_largefile: Uncommented the file.truncate() tests, and reworked to do more. The old comment about "permission errors" in the truncation tests under Windows was almost certainly due to that the file wasn't open for *write* access at this point, so of course MS wouldn't let you truncate it. I'd be appalled if a Unixish system did. CAUTION: Someone should run this test on Linux (etc) too. The truncation part was commented out before. Note that test_largefile isn't run by default.
* Ignore SIGXFSZ. Fixes #490453.Martin v. Löwis2001-12-111-0/+9
|
* Remove two XXX comments that have been resolved.Guido van Rossum2001-09-101-2/+0
|
* Move the global variables 'size' and 'name' to the top -- these areGuido van Rossum2001-09-101-5/+5
| | | | | "module parameters", and used in the Windows test (which crashed because size was undefined -- sigh).
* Change the criteria for skipping the test.Guido van Rossum2001-09-101-19/+22
| | | | | | | | | | | | | | | If on Windows, we require the 'largefile' resource. If not on Windows, we use a test that actually writes a byte beyond the 2BG limit -- seeking alone is not sufficient, since on some systems (e.g. Linux with glibc 2.2) the sytem call interface supports large seek offsets but not all filesystem implementations do. Note that on Windows, we do not use the write test: on Win2K, that test can take a minute trying to zero all those blocks on disk, and on Windows our code always supports large seek offsets (but again, not all filesystems do). This may mean that on Win95, or on certain other backward filesystems, test_largefile will *fail*.
* Dubious assumptions:Tim Peters2001-09-061-5/+10
| | | | | | | | | | | 1. That seeking beyond the end of a file increases the size of a file. 2. That files so extended are magically filled with null bytes. I find no support for either in the C std, and #2 in particular turns out not to be true on Win32 (you apparently see whatever trash happened to be on disk). Left #1 intact, but changed the test to check only bytes it explicitly wrote. Also fiddled the "expected" vs "got" failure reports to consistently use repr (%r) -- they weren't readable otherwise.
* Enable large file support on Win32 systems.Tim Peters2001-09-061-4/+4
| | | | | | | | | Curious: the MS docs say stati64 etc are supported even on Win95, but Win95 doesn't support a filesystem that allows partitions > 2 Gb. test_largefile: This was opening its test file in text mode. I have no idea how that worked under Win64, but it sure needs binary mode on Win98. BTW, on Win98 test_largefile runs quickly (under a second).
* Remove a debug print left in the code by Fred.Guido van Rossum2001-09-051-1/+0
|
* Use test_support.requires() to decide whether additional largefileBarry Warsaw2001-08-201-7/+8
| | | | tests should be run.
* When doing the quick test to see whether large files are supported,Guido van Rossum2001-04-101-1/+1
| | | | | | catch IOError as well as OverflowError. I found that on Tru64 Unix this was raised; probably because the OS (or libc) doesn't support large files but the architecture is 64 bits!
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-10/+10
|
* Make sure the temporary file is cleaned up even when we raise TestSkipped.Fred Drake2000-10-231-21/+24
|
* Add largefile support for Linux64 and WIn64. Add test_largefile and some minorTrent Mick2000-08-111-0/+129
change to regrtest.py to allow optional running of test_largefile ('cause it's slow on Win64). This closes patches: http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470 and http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470