MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_filename

Method test_filename

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

Source from the content-addressed store, hash-verified

1425 self.assertEqual(file_data, uncompressed_raw * 2)
1426
1427 def test_filename(self):
1428 with TempFile(TESTFN):
1429 with lzma.open(TESTFN, "wb") as f:
1430 f.write(INPUT)
1431 with open(TESTFN, "rb") as f:
1432 file_data = lzma.decompress(f.read())
1433 self.assertEqual(file_data, INPUT)
1434 with lzma.open(TESTFN, "rb") as f:
1435 self.assertEqual(f.read(), INPUT)
1436 with lzma.open(TESTFN, "ab") as f:
1437 f.write(INPUT)
1438 with lzma.open(TESTFN, "rb") as f:
1439 self.assertEqual(f.read(), INPUT * 2)
1440
1441 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <FakePath '@test_23396_tmp챈'> != '@test_23396_tmp챈'
1442 def test_with_pathlike_filename(self):

Callers

nothing calls this directly

Calls 7

TempFileClass · 0.70
openFunction · 0.50
openMethod · 0.45
writeMethod · 0.45
decompressMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected