Skip to content

Commit df83ff4

Browse files
committed
Skip GPU contexts
1 parent c96732b commit df83ff4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_elements.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ def assert_all_close(expected, setval):
302302

303303
# Tests
304304
# =====
305-
@for_all_test_contexts
305+
@for_all_test_contexts(
306+
excluding=('ContextCupy', 'ContextPyopencl') # BlackAbsorber not on GPU
307+
)
306308
def test_black_absorber(test_context):
307309
# Test instantiation
308310
elem = xc.BlackAbsorber(length=1, _context=test_context)
@@ -343,7 +345,9 @@ def test_black_absorber(test_context):
343345
setattr(elem, field, 0.3)
344346

345347

346-
@for_all_test_contexts
348+
@for_all_test_contexts(
349+
excluding=('ContextCupy', 'ContextPyopencl') # not on GPU
350+
)
347351
def test_black_crystal(test_context):
348352
# Test instantiation
349353
elem = xc.BlackCrystal(length=1, jaw=0.99, side='-', _context=test_context)

0 commit comments

Comments
 (0)