From 27635550bfeb7f530bbce27f66c22c058312f02c Mon Sep 17 00:00:00 2001 From: Vincent Quenneville-Belair Date: Fri, 3 Apr 2020 14:48:08 -0700 Subject: [PATCH] run tests again. --- test/test_batch_consistency.py | 4 ++++ test/test_librosa_compatibility.py | 4 ++++ test/test_torchscript_consistency.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/test/test_batch_consistency.py b/test/test_batch_consistency.py index 29141374f3..69c398bfb6 100644 --- a/test/test_batch_consistency.py +++ b/test/test_batch_consistency.py @@ -315,3 +315,7 @@ def test_batch_Vol(self): assert computed.shape == expected.shape, (computed.shape, expected.shape) assert torch.allclose(computed, expected) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_librosa_compatibility.py b/test/test_librosa_compatibility.py index 6a8cb72c2b..36bdb7a195 100644 --- a/test/test_librosa_compatibility.py +++ b/test/test_librosa_compatibility.py @@ -344,3 +344,7 @@ def test_InverseMelScale(self): # torch.dist(spec_lr, spec_ta, p=1) # >>> tensor(943.2759) assert torch.dist(spec_orig, spec_ta, p=1) < threshold + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_torchscript_consistency.py b/test/test_torchscript_consistency.py index 606abf552e..fba009d29d 100644 --- a/test/test_torchscript_consistency.py +++ b/test/test_torchscript_consistency.py @@ -408,3 +408,7 @@ def test_Vol(self): common_utils.TEST_DIR_PATH, 'assets', 'steam-train-whistle-daniel_simon.wav') waveform, _ = torchaudio.load(test_filepath) _test_script_module(torchaudio.transforms.Vol, waveform, 1.1) + + +if __name__ == '__main__': + unittest.main()