1. 26 Agu, 2003 1 kayıt (commit)
    • Jason Tishler's avatar
      test_largefile can leave its temp file open if one of many tests fail. On · 063606a0
      Jason Tishler yazdı
      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.
      063606a0
  2. 02 Ara, 2002 1 kayıt (commit)
  3. 23 Tem, 2002 1 kayıt (commit)
    • Barry Warsaw's avatar
      Get rid of relative imports in all unittests. Now anything that · 04f357cf
      Barry Warsaw yazdı
      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. :)
      04f357cf
  4. 12 Mar, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      Change Windows file.truncate() to (a) restore the original file position, · 8f01b680
      Tim Peters yazdı
      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).
      8f01b680
  5. 11 Mar, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      file_truncate(): provide full "large file" support on Windows, by · fb05db2c
      Tim Peters yazdı
      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.
      fb05db2c
  6. 11 Ara, 2001 1 kayıt (commit)
  7. 10 Eyl, 2001 3 kayıt (commit)
    • Guido van Rossum's avatar
      f49dcea2
    • Guido van Rossum's avatar
      Move the global variables 'size' and 'name' to the top -- these are · a31ddbbd
      Guido van Rossum yazdı
      "module parameters", and used in the Windows test (which crashed
      because size was undefined -- sigh).
      a31ddbbd
    • Guido van Rossum's avatar
      Change the criteria for skipping the test. · 47f40343
      Guido van Rossum yazdı
      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*.
      47f40343
  8. 06 Eyl, 2001 2 kayıt (commit)
    • Tim Peters's avatar
      Dubious assumptions: · b8c0230a
      Tim Peters yazdı
      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.
      b8c0230a
    • Tim Peters's avatar
      Enable large file support on Win32 systems. · 6e13a562
      Tim Peters yazdı
      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).
      6e13a562
  9. 05 Eyl, 2001 1 kayıt (commit)
  10. 20 Agu, 2001 1 kayıt (commit)
  11. 10 Nis, 2001 1 kayıt (commit)
  12. 23 Eki, 2000 2 kayıt (commit)
  13. 11 Agu, 2000 1 kayıt (commit)