Skip to content

Commit 91e85c3

Browse files
committed
Updating tests
1 parent 5940b91 commit 91e85c3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/test_dress.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ class Element(dress(ElementData)):
4545
def __init__(self, vv, **kwargs):
4646
self.xoinitialize(n=len(vv), b=np.sum(vv), vv=vv, **kwargs)
4747

48-
ele1 = Element([1,2,3])
49-
ele2 = Element([7,8,9], _buffer=ele1._buffer)
48+
for context in xo.context.get_test_contexts():
49+
print(f"Test {context.__class__}")
50+
ele1 = Element([1,2,3], _context=context)
51+
ele2 = Element([7,8,9], _buffer=ele1._buffer)
5052

51-
assert ele1.vv[1] == ele1._xobject.vv[1] == 2
52-
assert ele2.vv[1] == ele2._xobject.vv[1] == 8
53-
for ee in [ele1, ele2]:
54-
assert (ee._buffer is ee._xobject._buffer)
55-
assert (ee._offset == ee._xobject._offset)
53+
assert ele1.vv[1] == ele1._xobject.vv[1] == 2
54+
assert ele2.vv[1] == ele2._xobject.vv[1] == 8
55+
for ee in [ele1, ele2]:
56+
assert (ee._buffer is ee._xobject._buffer)
57+
assert (ee._offset == ee._xobject._offset)
5658

57-
assert ele1._buffer is ele2._buffer
58-
assert ele1._offset != ele2._offset
59+
assert ele1._buffer is ele2._buffer
60+
assert ele1._offset != ele2._offset

0 commit comments

Comments
 (0)