MCPcopy Index your code
hub / github.com/python/cpython / test_read1_bad_args

Method test_read1_bad_args

Lib/test/test_lzma.py:1015–1022  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1013 self.assertEqual(f.read1(), b"")
1014
1015 def test_read1_bad_args(self):
1016 f = LZMAFile(BytesIO(COMPRESSED_XZ))
1017 f.close()
1018 self.assertRaises(ValueError, f.read1)
1019 with LZMAFile(BytesIO(), "w") as f:
1020 self.assertRaises(ValueError, f.read1)
1021 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1022 self.assertRaises(TypeError, f.read1, None)
1023
1024 def test_peek(self):
1025 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
LZMAFileClass · 0.90
BytesIOClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected