(self, tmp_path)
| 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")) |