Skip to content

Commit 884c2d6

Browse files
committed
Stop asking for confirmation during tests
1 parent 763bbcc commit 884c2d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

PyTorchUtils/PyTorchUtils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def importTorch(self):
7474

7575
def installTorch(self, askConfirmation=False):
7676
"""Install PyTorch and return the ``torch`` Python module."""
77-
if askConfirmation:
77+
if askConfirmation and not slicer.app.commandOptions().testingEnabled:
7878
install = slicer.util.confirmOkCancelDisplay(
7979
'PyTorch will be downloaded and installed now. The process might take some minutes.'
8080
)

0 commit comments

Comments
 (0)