Skip to content

Commit 83e8834

Browse files
committed
Fixed test_to_csv_zip_arcname for Windows paths
1 parent 2e782f9 commit 83e8834

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/io/formats/test_to_csv.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,5 +551,7 @@ def test_to_csv_zip_arcname(self, compression, arcname):
551551
arcname=arcname)
552552
zp = ZipFile(path)
553553
expected_arcname = path if arcname is None else arcname
554+
expected_arcname = os.path.basename(expected_arcname)
554555
assert len(zp.filelist) == 1
555-
assert zp.filelist[0].filename == expected_arcname
556+
archived_file = os.path.basename(zp.filelist[0].filename)
557+
assert archived_file == expected_arcname

0 commit comments

Comments
 (0)