Skip to content

Commit 52a3f93

Browse files
committed
Make dummy strings used in test consistent
1 parent f32de5c commit 52a3f93

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/tests/frame/test_to_csv.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -744,13 +744,13 @@ def test_to_csv_bytes(self):
744744
# GH 9712
745745
times = date_range("2013-10-27 23:00", "2013-10-28 00:00", freq="H")
746746
df = DataFrame(
747-
{b"hello": [b"abcd", b"world"], b"times": times}, index=[b"A", b"B"]
747+
{b"foo": [b"bar", b"baz"], b"times": times}, index=[b"A", b"B"]
748748
)
749749
df.loc[b"C"] = np.nan
750750
df.index.name = b"idx"
751751

752752
df_expected = DataFrame(
753-
{"hello": ["abcd", "world"], "times": times}, index=["A", "B"]
753+
{"foo": ["bar", "baz"], "times": times}, index=["A", "B"]
754754
)
755755
df_expected.loc["C"] = np.nan
756756
df_expected.index.name = "idx"
@@ -763,10 +763,10 @@ def test_to_csv_bytes(self):
763763

764764
non_unicode_byte = b"\xbc\xa6"
765765
non_unicode_decoded = non_unicode_byte.decode("gb18030")
766-
df = DataFrame({non_unicode_byte: [non_unicode_byte, b"world"]})
766+
df = DataFrame({non_unicode_byte: [non_unicode_byte, b"foo"]})
767767
df.index.name = "idx"
768768

769-
df_expected = DataFrame({non_unicode_decoded: [non_unicode_decoded, "world"]})
769+
df_expected = DataFrame({non_unicode_decoded: [non_unicode_decoded, "foo"]})
770770
df_expected.index.name = "idx"
771771

772772
with tm.ensure_clean("__tmp_to_csv_bytes__.csv") as path:
@@ -779,13 +779,13 @@ def test_to_csv_bytes(self):
779779
df.to_csv(bytes_encoding="utf-8")
780780

781781
# mixing of bytes and non-bytes
782-
df = DataFrame({"hello": [b"abcd", "world"]})
782+
df = DataFrame({"foo": [b"bar", "baz"]})
783783
with pytest.raises(ValueError):
784784
df.to_csv()
785-
df = DataFrame({b"hello": ["a", "b"], "world": ["c", "d"]})
785+
df = DataFrame({b"foo": ["a", "b"], "bar": ["c", "d"]})
786786
with pytest.raises(ValueError):
787787
df.to_csv()
788-
df = DataFrame({"hello": ["a", "b"], "world": ["c", "d"]}, index=["A", b"B"])
788+
df = DataFrame({"foo": ["a", "b"], "bar": ["c", "d"]}, index=["A", b"B"])
789789
with pytest.raises(ValueError):
790790
df.to_csv()
791791

0 commit comments

Comments
 (0)