parser = all_parsers
path = "{}.csv".format(tm.rands(10))
- msg = f"File {path} does not exist" if parser.engine == "c" else r"\[Errno 2\]"
+ msg = f"File {path} does not exist" if parser.engine == "c" else r"\[Errno 2\]|\[Errno [0-9]+\] No such file or directory"
with pytest.raises(FileNotFoundError, match=msg) as e:
parser.read_csv(path)
parsing files for each parser defined in parsers.py
"""
from io import BytesIO
-from multiprocessing.pool import ThreadPool
+import pytest
+try:
+ from multiprocessing.pool import ThreadPool
+ ThreadPool()
+except ImportError:
+ pytest.skip(reason="multiprocessing not available",allow_module_level=True)
import numpy as np
path = os.path.join(HERE, "data", "does_not_exist." + fn_ext)
msg1 = r"File (b')?.+does_not_exist\.{}'? does not exist".format(fn_ext)
- msg2 = fr"\[Errno 2\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
+ msg2 = fr"\[Errno [0-9]+\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
msg3 = "Expected object or value"
msg4 = "path_or_buf needs to be a string file path or file-like"
msg5 = (
monkeypatch.setattr(icom, "_expand_user", lambda x: os.path.join("foo", x))
msg1 = fr"File (b')?.+does_not_exist\.{fn_ext}'? does not exist"
- msg2 = fr"\[Errno 2\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
+ msg2 = fr"\[Errno [0-9]+\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
msg3 = "Unexpected character found when decoding 'false'"
msg4 = "path_or_buf needs to be a string file path or file-like"
msg5 = (