Skip to content

Commit

Permalink
TST: Add test for sub-char in read_csv
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Jul 16, 2017
1 parent 7ffe7fc commit 231a9c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pandas/tests/io/parser/common.py
Expand Up @@ -1677,6 +1677,16 @@ def test_internal_eof_byte_to_file(self):
result = self.read_csv(path)
tm.assert_frame_equal(result, expected)

def test_sub_character(self):
# see gh-16893
dirpath = tm.get_data_path()
filename = os.path.join(dirpath, "sub_char.csv")

expected = DataFrame([[1, 2, 3]], columns=["a", "\x1ab", "c"])
result = self.read_csv(filename)

tm.assert_frame_equal(result, expected)

def test_file_handles(self):
# GH 14418 - don't close user provided file handles

Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/io/parser/data/sub_char.csv
@@ -0,0 +1,2 @@
a,"b",c
1,2,3

0 comments on commit 231a9c4

Please sign in to comment.