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
55f61d15
Unverified
Commit
55f61d15
authored
Dec 18, 2019
by
Vincent QB
Committed by
GitHub
Dec 18, 2019
Browse files
deactivate failing test (#372)
Skip librosa consistency test. unittest need one-line skip condition.
parent
d1825985
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
test/test_transforms.py
test/test_transforms.py
+5
-1
No files found.
test/test_transforms.py
View file @
55f61d15
...
@@ -16,6 +16,7 @@ if IMPORT_LIBROSA:
...
@@ -16,6 +16,7 @@ if IMPORT_LIBROSA:
if
IMPORT_SCIPY
:
if
IMPORT_SCIPY
:
import
scipy
import
scipy
SKIP_LIBROSA_CONSISTENCY_TEST
=
True
RUN_CUDA
=
torch
.
cuda
.
is_available
()
RUN_CUDA
=
torch
.
cuda
.
is_available
()
print
(
"Run test with cuda:"
,
RUN_CUDA
)
print
(
"Run test with cuda:"
,
RUN_CUDA
)
...
@@ -205,7 +206,10 @@ class Tester(unittest.TestCase):
...
@@ -205,7 +206,10 @@ class Tester(unittest.TestCase):
self
.
assertTrue
(
torch_mfcc_norm_none
.
allclose
(
norm_check
))
self
.
assertTrue
(
torch_mfcc_norm_none
.
allclose
(
norm_check
))
@
unittest
.
skipIf
(
not
IMPORT_LIBROSA
or
not
IMPORT_SCIPY
,
'Librosa and scipy are not available'
)
@
unittest
.
skipIf
(
SKIP_LIBROSA_CONSISTENCY_TEST
or
not
IMPORT_LIBROSA
or
not
IMPORT_SCIPY
,
'Librosa and scipy are not available, or consisency test disabled'
)
def
test_librosa_consistency
(
self
):
def
test_librosa_consistency
(
self
):
def
_test_librosa_consistency_helper
(
n_fft
,
hop_length
,
power
,
n_mels
,
n_mfcc
,
sample_rate
):
def
_test_librosa_consistency_helper
(
n_fft
,
hop_length
,
power
,
n_mels
,
n_mfcc
,
sample_rate
):
input_path
=
os
.
path
.
join
(
self
.
test_dirpath
,
'assets'
,
'sinewave.wav'
)
input_path
=
os
.
path
.
join
(
self
.
test_dirpath
,
'assets'
,
'sinewave.wav'
)
...
...
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