File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,22 @@ def tearDownClass(cls):
47
47
48
48
def test_large_reads_writes (self ):
49
49
# see issue #24658
50
- size = size / 10
51
50
requires ('largefile' ,
52
51
'test requires %s bytes and a long time to run' % size )
53
- self .addCleanup (unlink , TESTFN )
52
+ # self.addCleanup(unlink, TESTFN)
53
+ # with self.open(TESTFN, "wb") as f:
54
+ # b = b'x' * size
55
+ # self.assertEqual(f.write(b), size)
56
+ # self.assertEqual(f.tell(), size)
54
57
with self .open (TESTFN , "wb" ) as f :
55
- b = b'x' * size
56
- self .assertEqual (f .write (b ), size )
57
- self .assertEqual (f .tell (), size )
58
+ f .seek (size )
59
+ f .write (b'a' )
60
+ f .flush ()
61
+ self .assertEqual (f .tell (), size + 1 )
58
62
59
63
with self .open (TESTFN , "rb" ) as f :
60
64
f .read ()
61
- self .assertEqual (f .tell (), size )
65
+ self .assertEqual (f .tell (), size + 1 )
62
66
63
67
def test_osstat (self ):
64
68
self .assertEqual (os .stat (TESTFN )[stat .ST_SIZE ], size + 1 )
You can’t perform that action at this time.
0 commit comments