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,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
|
# pylint: disable=global-statement, invalid-name, unused-import
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import glob
|
import glob
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
|
@ -13,14 +14,16 @@ import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
try:
|
BURSTS = 1
|
||||||
|
FRAMESPERBURST = 1
|
||||||
|
TESTFRAMES = 3
|
||||||
|
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
BURSTS = int(os.environ["BURSTS"])
|
BURSTS = int(os.environ["BURSTS"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||||
except KeyError:
|
|
||||||
BURSTS = 1
|
|
||||||
FRAMESPERBURST = 1
|
|
||||||
TESTFRAMES = 3
|
|
||||||
|
|
||||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
# 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,
|
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||||
|
|
|
@ -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
|
# pylint: disable=global-statement, invalid-name, unused-import
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import glob
|
import glob
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
|
@ -13,14 +14,16 @@ import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
try:
|
BURSTS = 1
|
||||||
|
FRAMESPERBURST = 1
|
||||||
|
TESTFRAMES = 3
|
||||||
|
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
BURSTS = int(os.environ["BURSTS"])
|
BURSTS = int(os.environ["BURSTS"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||||
except KeyError:
|
|
||||||
BURSTS = 1
|
|
||||||
FRAMESPERBURST = 1
|
|
||||||
TESTFRAMES = 3
|
|
||||||
|
|
||||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
# 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,
|
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||||
|
|
|
@ -4,6 +4,7 @@ Tests a high signal-to-noise ratio path with codec2 data formats.
|
||||||
|
|
||||||
# pylint: disable=global-statement, invalid-name, unused-import
|
# pylint: disable=global-statement, invalid-name, unused-import
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -12,14 +13,16 @@ import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
try:
|
BURSTS = 1
|
||||||
|
FRAMESPERBURST = 1
|
||||||
|
TESTFRAMES = 3
|
||||||
|
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
BURSTS = int(os.environ["BURSTS"])
|
BURSTS = int(os.environ["BURSTS"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||||
except KeyError:
|
|
||||||
BURSTS = 1
|
|
||||||
FRAMESPERBURST = 1
|
|
||||||
TESTFRAMES = 3
|
|
||||||
|
|
||||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
# 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,
|
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||||
|
|
|
@ -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
|
# pylint: disable=global-statement, invalid-name, unused-import
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -12,14 +13,16 @@ import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
try:
|
BURSTS = 1
|
||||||
|
FRAMESPERBURST = 1
|
||||||
|
TESTFRAMES = 3
|
||||||
|
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
BURSTS = int(os.environ["BURSTS"])
|
BURSTS = int(os.environ["BURSTS"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
FRAMESPERBURST = int(os.environ["FRAMESPERBURST"])
|
||||||
|
with contextlib.suppress(KeyError):
|
||||||
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
TESTFRAMES = int(os.environ["TESTFRAMES"])
|
||||||
except KeyError:
|
|
||||||
BURSTS = 1
|
|
||||||
FRAMESPERBURST = 1
|
|
||||||
TESTFRAMES = 3
|
|
||||||
|
|
||||||
# For some reason, sometimes, this test requires the current directory to be `test`.
|
# 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,
|
# Try to adapt dynamically. I still want to figure out why but as a workaround,
|
||||||
|
|
Loading…
Reference in a new issue