Skip to content

Commit f42283d

Browse files
nparleyjreback
authored andcommitted
COMPAT: mmap error is not always returned in English
Fixes a build error from pandas-dev#12946 caused by mmap error being returned in Italian when `LOCALE_OVERRIDE="it_IT.UTF-8"`. The test fails with: `AssertionError: "Invalid argument" does not match "[Errno 22] Argomento non valido"` ```python msg = "Invalid argument" tm.assertRaisesRegexp(mmap.error, msg, common.MMapWrapper, non_file) ``` i.e. message is not being matched. Change to match the errno instead as that's the same across languages. Author: Neil Parley <[email protected]> Closes pandas-dev#13507 from nparley/mmap-test-fix and squashes the following commits: 160af24 [Neil Parley] mmap error is not always returned in English
1 parent 01e3de4 commit f42283d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/tests/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_constructor_bad_file(self):
105105
msg = "The parameter is incorrect"
106106
err = OSError
107107
else:
108-
msg = "Invalid argument"
108+
msg = "[Errno 22]"
109109
err = mmap.error
110110

111111
tm.assertRaisesRegexp(err, msg, common.MMapWrapper, non_file)

0 commit comments

Comments
 (0)