mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Do a better job using environment variables.
This commit is contained in:
parent
94df494041
commit
afede05732
4 changed files with 32 additions and 20 deletions
|
@ -4,6 +4,7 @@ Tests a high signal-to-noise ratio path with codec2 data formats using codec2 to
|
|||
|
||||
# pylint: disable=global-statement, invalid-name, unused-import
|
||||
|
||||
import contextlib
|
||||
import glob
|
||||
import multiprocessing
|
||||
import os
|
||||
|
@ -13,15 +14,17 @@ import time
|
|||
|
||||
import pytest
|
||||
|
||||
try:
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
except KeyError:
|
||||
BURSTS = 1
|
||||
FRAMESPERBURST = 1
|
||||
TESTFRAMES = 3
|
||||
|
||||
with contextlib.suppress(KeyError):
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
with contextlib.suppress(KeyError):
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
with contextlib.suppress(KeyError):
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
|
||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
||||
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||
# I'm not completely dissatisfied.
|
||||
|
|
|
@ -4,6 +4,7 @@ Tests a high signal-to-noise ratio path with codec2 data formats using codec2 to
|
|||
|
||||
# pylint: disable=global-statement, invalid-name, unused-import
|
||||
|
||||
import contextlib
|
||||
import glob
|
||||
import multiprocessing
|
||||
import os
|
||||
|
@ -13,15 +14,17 @@ import time
|
|||
|
||||
import pytest
|
||||
|
||||
try:
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
except KeyError:
|
||||
BURSTS = 1
|
||||
FRAMESPERBURST = 1
|
||||
TESTFRAMES = 3
|
||||
|
||||
with contextlib.suppress(KeyError):
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
with contextlib.suppress(KeyError):
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
with contextlib.suppress(KeyError):
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
|
||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
||||
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||
# I'm not completely dissatisfied.
|
||||
|
|
|
@ -4,6 +4,7 @@ Tests a high signal-to-noise ratio path with codec2 data formats.
|
|||
|
||||
# pylint: disable=global-statement, invalid-name, unused-import
|
||||
|
||||
import contextlib
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
|
@ -12,15 +13,17 @@ import time
|
|||
|
||||
import pytest
|
||||
|
||||
try:
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
except KeyError:
|
||||
BURSTS = 1
|
||||
FRAMESPERBURST = 1
|
||||
TESTFRAMES = 3
|
||||
|
||||
with contextlib.suppress(KeyError):
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
with contextlib.suppress(KeyError):
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
with contextlib.suppress(KeyError):
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
|
||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
||||
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||
# I'm not completely dissatisfied.
|
||||
|
|
|
@ -4,6 +4,7 @@ Tests a high signal-to-noise ratio path with multiple codec2 data formats.
|
|||
|
||||
# pylint: disable=global-statement, invalid-name, unused-import
|
||||
|
||||
import contextlib
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
|
@ -12,15 +13,17 @@ import time
|
|||
|
||||
import pytest
|
||||
|
||||
try:
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
except KeyError:
|
||||
BURSTS = 1
|
||||
FRAMESPERBURST = 1
|
||||
TESTFRAMES = 3
|
||||
|
||||
with contextlib.suppress(KeyError):
|
||||
BURSTS = int(os.environ["BURSTS"])
|
||||
with contextlib.suppress(KeyError):
|
||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||
with contextlib.suppress(KeyError):
|
||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||
|
||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
||||
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||
# I'm not completely dissatisfied.
|
||||
|
|
Loading…
Reference in a new issue