We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08a7127 commit 8f4c4d2Copy full SHA for 8f4c4d2
test/common_utils/case_utils.py
@@ -70,9 +70,8 @@ def skipIfNoModule(module, display_name=None):
70
71
72
def skipIfNoExtension(test_item):
73
- if (
74
- not is_module_available('torchaudio._torchaudio')
75
- and 'TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION' in os.environ
76
- ):
+ if is_module_available('torchaudio._torchaudio'):
+ return test_item
+ if 'TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION' in os.environ:
77
raise RuntimeError('torchaudio C++ extension is not available.')
78
return unittest.skip('torchaudio C++ extension is not available')(test_item)
0 commit comments