mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add flush() method to fake file.
This commit is contained in:
parent
db2b70cb99
commit
75fce308bc
1 changed files with 3 additions and 0 deletions
|
@ -171,6 +171,9 @@ class Compare:
|
||||||
raise test_support.TestFailed, \
|
raise test_support.TestFailed, \
|
||||||
'Writing: '+`data`+', expected: '+`expected`
|
'Writing: '+`data`+', expected: '+`expected`
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
leftover = self.fp.read()
|
leftover = self.fp.read()
|
||||||
if leftover:
|
if leftover:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue