mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
More changes needed to make things work once bytes and str are truly divorced.
This commit is contained in:
parent
25a29a9534
commit
e22905a06c
7 changed files with 80 additions and 75 deletions
|
@ -39,7 +39,7 @@ else:
|
|||
# 2**31 == 2147483648
|
||||
f.seek(2147483649)
|
||||
# Seeking is not enough of a test: you must write and flush, too!
|
||||
f.write("x")
|
||||
f.write(b"x")
|
||||
f.flush()
|
||||
except (IOError, OverflowError):
|
||||
f.close()
|
||||
|
@ -70,10 +70,10 @@ if test_support.verbose:
|
|||
print('create large file via seek (may be sparse file) ...')
|
||||
f = open(name, 'wb')
|
||||
try:
|
||||
f.write('z')
|
||||
f.write(b'z')
|
||||
f.seek(0)
|
||||
f.seek(size)
|
||||
f.write('a')
|
||||
f.write(b'a')
|
||||
f.flush()
|
||||
if test_support.verbose:
|
||||
print('check file size with os.fstat')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue