We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e5852e commit a1a60efCopy full SHA for a1a60ef
pandas/tests/io/parser/test_common.py
@@ -969,6 +969,18 @@ def test_nonexistent_path(all_parsers):
969
assert path == filename
970
971
972
+def test_no_permission(all_parsers):
973
+ # GH 23784
974
+ parser = all_parsers
975
+
976
+ msg = r"\[Errno 13\]"
977
+ with tm.ensure_clean() as path:
978
+ os.chmod(path, 0) # make file unreadable
979
+ with pytest.raises(PermissionError, match=msg) as e:
980
+ parser.read_csv(path)
981
+ assert path == e.value.filename
982
983
984
def test_missing_trailing_delimiters(all_parsers):
985
parser = all_parsers
986
data = """A,B,C,D
0 commit comments