forked from speechbrain/speechbrain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
27 lines (23 loc) · 1008 Bytes
/
conftest.py
File metadata and controls
27 lines (23 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
def pytest_addoption(parser):
parser.addoption("--device", action="store", default="cpu")
def pytest_generate_tests(metafunc):
# This is called for every test. Only get/set command line arguments
# if the argument is specified in the list of test "fixturenames".
option_value = metafunc.config.option.device
if "device" in metafunc.fixturenames and option_value is not None:
metafunc.parametrize("device", [option_value])
collect_ignore = [
"speechbrain/integrations/",
# These can be removed once the modules are fully deprecated
"speechbrain/utils/bleu.py",
"speechbrain/utils/kmeans.py",
"speechbrain/processing/diarization.py",
"speechbrain/decoders/language_model.py",
"speechbrain/alignment/ctc_segmentation.py",
"speechbrain/lobes/models/fairseq_wav2vec.py",
"speechbrain/lobes/models/kmeans.py",
]
try:
import numba # noqa: F401
except ModuleNotFoundError:
collect_ignore.append("speechbrain/nnet/loss/transducer_loss.py")