parser = all_parsers
path = f"{tm.rands(10)}.csv"
- msg = r"\[Errno 2\]"
+ msg = r"\[Errno 2\]|\[Errno [0-9]+\] No such file or directory"
with pytest.raises(FileNotFoundError, match=msg) as e:
parser.read_csv(path)
assert path == e.value.filename
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("multiprocessing not available",allow_module_level=True)
import numpy as np
import pytest
path = os.path.join(HERE, "data", "does_not_exist." + fn_ext)
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 = "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 = (
def test_dask(df):
+ try:
+ from multiprocessing.pool import ThreadPool
+ ThreadPool()
+ except ImportError:
+ pytest.skip("multiprocessing not available")
toolz = import_module("toolz") # noqa
dask = import_module("dask") # noqa