Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
11b00d5c
Unverified
Commit
11b00d5c
authored
Aug 04, 2020
by
moto
Committed by
GitHub
Aug 04, 2020
Browse files
Fix skipIfNoExtension (#849)
parent
08a71271
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
test/common_utils/case_utils.py
test/common_utils/case_utils.py
+3
-4
No files found.
test/common_utils/case_utils.py
View file @
11b00d5c
...
@@ -70,9 +70,8 @@ skipIfNoCuda = unittest.skipIf(not torch.cuda.is_available(), reason='CUDA not a
...
@@ -70,9 +70,8 @@ skipIfNoCuda = unittest.skipIf(not torch.cuda.is_available(), reason='CUDA not a
def
skipIfNoExtension
(
test_item
):
def
skipIfNoExtension
(
test_item
):
if
(
if
is_module_available
(
'torchaudio._torchaudio'
):
not
is_module_available
(
'torchaudio._torchaudio'
)
return
test_item
and
'TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION'
in
os
.
environ
if
'TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION'
in
os
.
environ
:
):
raise
RuntimeError
(
'torchaudio C++ extension is not available.'
)
raise
RuntimeError
(
'torchaudio C++ extension is not available.'
)
return
unittest
.
skip
(
'torchaudio C++ extension is not available'
)(
test_item
)
return
unittest
.
skip
(
'torchaudio C++ extension is not available'
)(
test_item
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment