Skip to content

Commit ff5590e

Browse files
committed
fix #8415
Signed-off-by: YunLiu <[email protected]>
1 parent 6c8de35 commit ff5590e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/networks/nets/test_transchex.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from monai.networks import eval_mode
2020
from monai.networks.nets.transchex import Transchex
21-
from tests.test_utils import skip_if_quick
21+
from tests.test_utils import skip_if_downloading_fails, skip_if_quick
2222

2323
TEST_CASE_TRANSCHEX = []
2424
for drop_out in [0.4]:
@@ -49,7 +49,8 @@
4949
class TestTranschex(unittest.TestCase):
5050
@parameterized.expand(TEST_CASE_TRANSCHEX)
5151
def test_shape(self, input_param, expected_shape):
52-
net = Transchex(**input_param)
52+
with skip_if_downloading_fails():
53+
net = Transchex(**input_param)
5354
with eval_mode(net):
5455
result = net(torch.randint(2, (2, 512)), torch.randint(2, (2, 512)), torch.randn((2, 3, 224, 224)))
5556
self.assertEqual(result.shape, expected_shape)

0 commit comments

Comments
 (0)