Skip to content

Commit 64372d5

Browse files
committed
Fix test interaction with grads
1 parent fce833a commit 64372d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/autojac/_transform/test_interactions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import torch
2+
from pytest import raises
23
from torch.testing import assert_close
34

45
from torchjd.autojac._transform import (
@@ -268,6 +269,5 @@ def test_stack_check_and_get_keys():
268269

269270
assert output_keys == {a}
270271

271-
output_keys = Stack([grad1, grad3]).check_keys({y1, y2})
272-
273-
assert output_keys == {a}
272+
with raises(ValueError):
273+
Stack([grad1, grad3]).check_keys({y1, y2})

0 commit comments

Comments
 (0)