Skip to content

Commit 7978e46

Browse files
committed
Fix tests
1 parent a45a53b commit 7978e46

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/python-windows.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ jobs:
4444
pip check
4545
- name: Run the tests
4646
run: |
47-
pytest -vv
47+
# Disable capturing (-s) output from Pytest on Windows.
48+
# For an unknown reason, capturing output interferes with
49+
# the file descriptions opened by the asyncio IOLoop.
50+
# This leads to a nasty, flaky race condition that we haven't
51+
# been able to solve.
52+
pytest -vv -s
4853
- name: Install the Python dependencies for the examples
4954
run: |
5055
cd examples/simple && pip install -e .

jupyter_server/traittypes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,12 @@ def _resolve_classes(self):
228228
self.importable_klasses = []
229229
for klass in self.klasses:
230230
if isinstance(klass, str):
231+
# Try importing the classes to compare. Silently, ignore if not importable.
231232
try:
232233
klass = self._resolve_string(klass)
233234
self.importable_klasses.append(klass)
234235
except:
235-
warn(f"{klass} is not importable. Is it installed?", ImportWarning)
236+
pass
236237
else:
237238
self.importable_klasses.append(klass)
238239

@@ -328,11 +329,12 @@ def _resolve_classes(self):
328329
self.importable_klasses = []
329330
for klass in self.klasses:
330331
if isinstance(klass, str):
332+
# Try importing the classes to compare. Silently, ignore if not importable.
331333
try:
332334
klass = self._resolve_string(klass)
333335
self.importable_klasses.append(klass)
334336
except:
335-
warn(f"{klass} is not importable. Is it installed?", ImportWarning)
337+
pass
336338
else:
337339
self.importable_klasses.append(klass)
338340

0 commit comments

Comments
 (0)