Skip to content

Commit

Permalink
speedup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
faroit committed Apr 16, 2024
1 parent ea9024e commit 6633639
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/test_augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from openunmix import data


@pytest.fixture(params=[4096, 4096 * 10])
@pytest.fixture(params=[4096])
def nb_timesteps(request):
return int(request.param)


@pytest.fixture(params=[1, 2, 3])
@pytest.fixture(params=[1, 2])
def nb_channels(request):
return request.param

Expand Down
10 changes: 5 additions & 5 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
from openunmix import umxl


@pytest.fixture(params=[10, 100])
@pytest.fixture(params=[100])
def nb_frames(request):
return int(request.param)


@pytest.fixture(params=[1, 2, 3])
@pytest.fixture(params=[1, 2])
def nb_channels(request):
return request.param


@pytest.fixture(params=[1, 5])
@pytest.fixture(params=[2])
def nb_samples(request):
return request.param


@pytest.fixture(params=[111, 1024])
@pytest.fixture(params=[1024])
def nb_bins(request):
return request.param

Expand All @@ -33,7 +33,7 @@ def spectrogram(request, nb_samples, nb_channels, nb_bins, nb_frames):
return torch.rand((nb_samples, nb_channels, nb_bins, nb_frames))


@pytest.fixture(params=[True, False])
@pytest.fixture(params=[False])
def unidirectional(request):
return request.param

Expand Down
10 changes: 5 additions & 5 deletions tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
from openunmix import transforms


@pytest.fixture(params=[4096, 44100])
@pytest.fixture(params=[4096])
def nb_timesteps(request):
return int(request.param)


@pytest.fixture(params=[1, 2])
@pytest.fixture(params=[2])
def nb_channels(request):
return request.param


@pytest.fixture(params=[1, 2])
@pytest.fixture(params=[2])
def nb_samples(request):
return request.param


@pytest.fixture(params=[1024, 2048, 4096])
@pytest.fixture(params=[2048])
def nfft(request):
return int(request.param)


@pytest.fixture(params=[2, 4])
@pytest.fixture(params=[2])
def hop(request, nfft):
return nfft // request.param

Expand Down

0 comments on commit 6633639

Please sign in to comment.