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

Method test_read_from_file_with_bytes_filename

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

Source from the content-addressed store, hash-verified

901 self.assertRaises(ValueError, f.seekable)
902
903 def test_read_from_file_with_bytes_filename(self):
904 bytes_filename = os.fsencode(TESTFN)
905 with TempFile(TESTFN, COMPRESSED_XZ):
906 with LZMAFile(bytes_filename) as f:
907 self.assertEqual(f.read(), INPUT)
908 self.assertEqual(f.read(), b"")
909 self.assertEqual(f.name, bytes_filename)
910
911 def test_read_from_fileobj(self):
912 with TempFile(TESTFN, COMPRESSED_XZ):

Callers

nothing calls this directly

Calls 4

LZMAFileClass · 0.90
TempFileClass · 0.70
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected