Skip to content

Commit

Permalink
Split combined shallow copy assert into two
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloesch committed Oct 24, 2024
1 parent 92149c1 commit f8335ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/data/test_subject.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ def test_shallow_copy_subject(self):
# The data of both copies needs to be the same as we are using a shallow copy
assert torch.allclose(sub_copy['t1'].data, copy_original_subj['t1'].data)
# The data of the original subject should not be modified
assert not torch.allclose(sub_copy['t1'].data, self.sample_subject['t1'].data)
assert not torch.allclose(
sub_copy['t1'].data, self.sample_subject['t1'].data
) and not torch.allclose(
copy_original_subj['t1'].data, self.sample_subject['t1'].data
)

0 comments on commit f8335ef

Please sign in to comment.