We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fce833a commit 64372d5Copy full SHA for 64372d5
tests/unit/autojac/_transform/test_interactions.py
@@ -1,4 +1,5 @@
1
import torch
2
+from pytest import raises
3
from torch.testing import assert_close
4
5
from torchjd.autojac._transform import (
@@ -268,6 +269,5 @@ def test_stack_check_and_get_keys():
268
269
270
assert output_keys == {a}
271
- output_keys = Stack([grad1, grad3]).check_keys({y1, y2})
272
-
273
- assert output_keys == {a}
+ with raises(ValueError):
+ Stack([grad1, grad3]).check_keys({y1, y2})
0 commit comments