Skip to content

Commit c804e5e

Browse files
committed
Fix tests checking Transforms
1 parent 5a97c18 commit c804e5e

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

tests/unit/autojac/_transform/test_base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ def test_compose_checks_keys():
6464
t1 = FakeTransform(required_keys={a1}, output_keys={a1, a2})
6565
t2 = FakeTransform(required_keys={a2}, output_keys={a1})
6666

67-
t1 << t2
67+
(t1 << t2).check_keys()
6868

6969
with raises(ValueError):
70-
t2 << t1
70+
(t2 << t1).check_keys()
7171

7272

7373
def test_conjunct_checks_required_keys():
@@ -83,13 +83,13 @@ def test_conjunct_checks_required_keys():
8383
t2 = FakeTransform(required_keys={a1}, output_keys=set())
8484
t3 = FakeTransform(required_keys={a2}, output_keys=set())
8585

86-
t1 | t2
86+
(t1 | t2).check_keys()
8787

8888
with raises(ValueError):
89-
t2 | t3
89+
(t2 | t3).check_keys()
9090

9191
with raises(ValueError):
92-
t1 | t2 | t3
92+
(t1 | t2 | t3).check_keys()
9393

9494

9595
def test_conjunct_checks_output_keys():
@@ -105,13 +105,13 @@ def test_conjunct_checks_output_keys():
105105
t2 = FakeTransform(required_keys=set(), output_keys={a1})
106106
t3 = FakeTransform(required_keys=set(), output_keys={a2})
107107

108-
t2 | t3
108+
(t2 | t3).check_keys()
109109

110110
with raises(ValueError):
111-
t1 | t3
111+
(t1 | t3).check_keys()
112112

113113
with raises(ValueError):
114-
t1 | t2 | t3
114+
(t1 | t2 | t3).check_keys()
115115

116116

117117
def test_empty_conjunction():

tests/unit/autojac/_transform/test_interactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,4 @@ def test_stack_different_required_keys():
262262
grad2 = Grad([y2], [a])
263263

264264
with raises(ValueError):
265-
_ = Stack([grad1, grad2])
265+
Stack([grad1, grad2]).check_keys()

0 commit comments

Comments
 (0)