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

Method test_with_pathlike_filename

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

Source from the content-addressed store, hash-verified

1440
1441 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <FakePath '@test_23396_tmp챈'> != '@test_23396_tmp챈'
1442 def test_with_pathlike_filename(self):
1443 filename = FakePath(TESTFN)
1444 with TempFile(filename):
1445 with lzma.open(filename, "wb") as f:
1446 f.write(INPUT)
1447 self.assertEqual(f.name, TESTFN)
1448 with open(filename, "rb") as f:
1449 file_data = lzma.decompress(f.read())
1450 self.assertEqual(file_data, INPUT)
1451 with lzma.open(filename, "rb") as f:
1452 self.assertEqual(f.read(), INPUT)
1453 self.assertEqual(f.name, TESTFN)
1454
1455 def test_bad_params(self):
1456 # Test invalid parameter combinations.

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected