parser = all_parsers
path = "{}.csv".format(tm.rands(10))
- msg = "does not exist" if parser.engine == "c" else r"\[Errno 2\]"
+ msg = "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 = (
- r"\[Errno 2\] No such file or directory: '.+does_not_exist" r"\.{}'"
+ r"\[Errno [0-9]+\] No such file or directory: '.+does_not_exist" r"\.{}'"
).format(fn_ext)
msg3 = "Expected object or value"
msg4 = "path_or_buf needs to be a string file path or file-like"
msg1 = r"File (b')?.+does_not_exist\.{}'? does not exist".format(fn_ext)
msg2 = (
- r"\[Errno 2\] No such file or directory:" r" '.+does_not_exist\.{}'"
+ r"\[Errno [0-9]+\] No such file or directory:" r" '.+does_not_exist\.{}'"
).format(fn_ext)
msg3 = "Unexpected character found when decoding 'false'"
msg4 = "path_or_buf needs to be a string file path or file-like"