Skip to content

Commit

Permalink
dev(hansbug): fix bug in unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed Oct 20, 2023
1 parent 1a23d12 commit 4f9a9f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/tree/integration/test_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def forward(self, x):
'd': torch.Size([2, 5, 3]),
})

@skipUnless(vpip('torch') and OS.linux and vpython < '3.11', 'torch required')
@skipUnless(torch is not None and vpip('torch') and OS.linux and vpython < '3.11', 'torch required')
def test_moduledict(self):
with torch.no_grad():
md = torch.nn.ModuleDict({
Expand Down

0 comments on commit 4f9a9f1

Please sign in to comment.