Skip to content

Commit 724a774

Browse files
committed
Add test cases from pandas-devgh-32207
The test files were generated by the bug submitter @joernhees
1 parent 1d4d460 commit 724a774

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
9.05 KB
Binary file not shown.
8.42 KB
Binary file not shown.

pandas/tests/io/excel/test_readers.py

+18
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,24 @@ def test_reader_dtype_str(self, read_ext, dtype, expected):
464464
actual = pd.read_excel(basename + read_ext, dtype=dtype)
465465
tm.assert_frame_equal(actual, expected)
466466

467+
def test_reader_spaces(self, read_ext):
468+
# see gh-32207
469+
basename = "test_spaces"
470+
471+
actual = pd.read_excel(basename + read_ext)
472+
expected = DataFrame(
473+
{
474+
'testcol': [
475+
'this is great',
476+
'4 spaces',
477+
'1 trailing ',
478+
' 1 leading',
479+
'2 spaces multiple times',
480+
]
481+
}
482+
)
483+
tm.assert_frame_equal(actual, expected)
484+
467485
def test_reading_all_sheets(self, read_ext):
468486
# Test reading all sheetnames by setting sheetname to None,
469487
# Ensure a dict is returned.

0 commit comments

Comments
 (0)