Skip to content

Commit

Permalink
fix numerous mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsg committed Dec 6, 2022
1 parent c7c708e commit 5432691
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/test_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ def test_close_errors(self):
writer.close()
# Close a second time to verify it successfully does nothing.
writer.close()

self.assertTrue(writer.closed)
# Try to write to closed file.
with self.assertRaises(ValueError):
writer.write(TEST_BINARY_DATA)
Expand Down Expand Up @@ -768,7 +770,7 @@ def test_seek(self):
def test_close(self):
buff = self._make_sliding_buffer()
buff.close()
self.assertTrue(buff.closed())
self.assertTrue(buff.closed)
with self.assertRaises(ValueError):
buff.read()

Expand Down Expand Up @@ -915,7 +917,7 @@ def test_close(self):
reader = self._make_blob_reader(blob)

reader.close()
self.assertRaises(self.closed)
self.assertTrue(reader.closed)

with self.assertRaises(ValueError):
reader.read()
Expand Down

0 comments on commit 5432691

Please sign in to comment.