| 340 | |
| 341 | |
| 342 | def test_ambiguous_archive_tar(tmp_path): |
| 343 | csvAPath = tmp_path / "a.csv" |
| 344 | with open(csvAPath, "w", encoding="utf-8") as a: |
| 345 | a.write("foo,bar\n") |
| 346 | csvBPath = tmp_path / "b.csv" |
| 347 | with open(csvBPath, "w", encoding="utf-8") as b: |
| 348 | b.write("foo,bar\n") |
| 349 | |
| 350 | tarpath = tmp_path / "archive.tar" |
| 351 | with tarfile.TarFile(tarpath, "w") as tar: |
| 352 | tar.add(csvAPath, "a.csv") |
| 353 | tar.add(csvBPath, "b.csv") |
| 354 | |
| 355 | with pytest.raises(ValueError, match="Multiple files found in TAR archive"): |
| 356 | pd.read_csv(tarpath) |
| 357 | |
| 358 | |
| 359 | def test_tar_gz_to_different_filename(temp_file): |