Unverified Commit adef7b94 authored by Vincent QB's avatar Vincent QB Committed by GitHub
Browse files

run tests again. (#509)

parent 4875007d
...@@ -315,3 +315,7 @@ class TestTransforms(unittest.TestCase): ...@@ -315,3 +315,7 @@ class TestTransforms(unittest.TestCase):
assert computed.shape == expected.shape, (computed.shape, expected.shape) assert computed.shape == expected.shape, (computed.shape, expected.shape)
assert torch.allclose(computed, expected) assert torch.allclose(computed, expected)
if __name__ == '__main__':
unittest.main()
...@@ -344,3 +344,7 @@ class TestTransforms(_LibrosaMixin, unittest.TestCase): ...@@ -344,3 +344,7 @@ class TestTransforms(_LibrosaMixin, unittest.TestCase):
# torch.dist(spec_lr, spec_ta, p=1) # torch.dist(spec_lr, spec_ta, p=1)
# >>> tensor(943.2759) # >>> tensor(943.2759)
assert torch.dist(spec_orig, spec_ta, p=1) < threshold assert torch.dist(spec_orig, spec_ta, p=1) < threshold
if __name__ == '__main__':
unittest.main()
...@@ -408,3 +408,7 @@ class TestTransforms(unittest.TestCase): ...@@ -408,3 +408,7 @@ class TestTransforms(unittest.TestCase):
common_utils.TEST_DIR_PATH, 'assets', 'steam-train-whistle-daniel_simon.wav') common_utils.TEST_DIR_PATH, 'assets', 'steam-train-whistle-daniel_simon.wav')
waveform, _ = torchaudio.load(test_filepath) waveform, _ = torchaudio.load(test_filepath)
_test_script_module(torchaudio.transforms.Vol, waveform, 1.1) _test_script_module(torchaudio.transforms.Vol, waveform, 1.1)
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment