-
Notifications
You must be signed in to change notification settings - Fork 739
Description
In #821, we improved the dataset tests to work on mocked files. In these changes, we applied the pattern to create mock dataset in setUpClass. As we keep improving the test for dataset, the setUpClass gets cluttered and became harder to grasp what's going on, so we should refactor the pattern.
In #1126 we extracted the dataset mocking part into a separate function. We can apply the same pattern to the other tests too. In the end, the initialization should look as simple as,
@classmethod
def setUpClass(cls):
cls.root_dir = cls.get_base_temp_dir()
cls.data = get_mock_dataset(cls.root_dir)with extracted helper function that creates mock data and returns the expected data.
def get_mock_dataset(root_dir):
...- yesno_test
- vctk_test
- tedlium_test
- speechcommand_test
- ljspeech_test
- libritts_test
- librispeech_test
- gtzan_test
- cmuarctic_test
Additionally, for CommonVoice, the mock part is extracted, but there are two helper functions what are very similar each other, so we can refactor that part too.