Skip to content

Commit f6d3873

Browse files
committed
warn rather than fail on weird error on import
1 parent 03e4ae6 commit f6d3873

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ipyparallel/tests/clienttest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import signal
44
import sys
55
import time
6+
import warnings
67
from contextlib import contextmanager
78

89
import pytest
@@ -83,6 +84,9 @@ def skip_without_names(f, *args, **kwargs):
8384
__import__(name)
8485
except ImportError:
8586
pytest.skip("Test requires %s" % name)
87+
except Exception as e:
88+
warnings.warn(f"Unexpected exception importing {name}: {e}")
89+
pytest.skip("Test requires %s" % name)
8690
return f(*args, **kwargs)
8791

8892
return skip_without_names

0 commit comments

Comments
 (0)