MCPcopy
hub / github.com/pallets/werkzeug / test_save_to_pathlib_dst

Method test_save_to_pathlib_dst

tests/test_datastructures.py:1247–1256  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

1245 file_storage.close()
1246
1247 def test_save_to_pathlib_dst(self, tmp_path):
1248 src = tmp_path / "src.txt"
1249 src.write_text("test")
1250 dst = tmp_path / "dst.txt"
1251
1252 with src.open("rb") as f:
1253 storage = self.storage_class(f)
1254 storage.save(dst)
1255
1256 assert dst.read_text() == "test"
1257
1258 def test_save_to_bytes_io(self):
1259 storage = self.storage_class(io.BytesIO(b"one\ntwo"))

Callers

nothing calls this directly

Calls 2

saveMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected