Skip to content

Commit b8ddeb3

Browse files
jimchen90Ji Chen
andauthored
Add subclass in model test classes (#727)
* add unittest in test_models * update test method * remove unittest main function Co-authored-by: Ji Chen <[email protected]>
1 parent e0f4c0e commit b8ddeb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_models.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import torch
22
from torchaudio.models import Wav2Letter, _MelResNet
33

4+
from . import common_utils
45

5-
class TestWav2Letter:
6+
7+
class TestWav2Letter(common_utils.TorchaudioTestCase):
68

79
def test_waveform(self):
810
batch_size = 2
@@ -31,7 +33,7 @@ def test_mfcc(self):
3133
assert out.size() == (batch_size, num_classes, 2)
3234

3335

34-
class TestMelResNet:
36+
class TestMelResNet(common_utils.TorchaudioTestCase):
3537

3638
def test_waveform(self):
3739

0 commit comments

Comments
 (0)