aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/lib')
-rw-r--r--test/src/lib/test_repo.py16
-rw-r--r--test/src/lib/tests.py6
2 files changed, 17 insertions, 5 deletions
diff --git a/test/src/lib/test_repo.py b/test/src/lib/test_repo.py
index 0356ad8..f295e91 100644
--- a/test/src/lib/test_repo.py
+++ b/test/src/lib/test_repo.py
@@ -76,7 +76,13 @@ class TestRepo(Repo):
return CI_SCRIPT.format(runs_dir=runs_dir)
def _count_run_files(self):
- return len([name for name in os.listdir(self.runs_dir) if os.path.isfile(os.path.join(self.runs_dir, name))])
+ return len(
+ [
+ name
+ for name in os.listdir(self.runs_dir)
+ if os.path.isfile(os.path.join(self.runs_dir, name))
+ ]
+ )
def run_files_are_present(self, expected):
assert expected == self._count_run_files()
@@ -98,7 +104,8 @@ class TestRepoOutput(TestRepo, abc.ABC):
def format_ci_script(self):
script = super().format_ci_script()
added = r'{output_script} | tee -a "$run_output_path"'.format(
- output_script=shlex.quote(self.output_script_path))
+ output_script=shlex.quote(self.output_script_path)
+ )
return f'{script}\n{added}\n'
def write_output_script(self):
@@ -226,7 +233,10 @@ class TestRepoSegfault(TestRepo):
def run_output_matches(self, output):
output = output.decode()
- return output.startswith("Started the test program.\n") and "You shouldn't see this." not in output
+ return (
+ output.startswith("Started the test program.\n")
+ and "You shouldn't see this." not in output
+ )
def run_files_are_present(self, *args):
return True
diff --git a/test/src/lib/tests.py b/test/src/lib/tests.py
index 7ccedef..b20ecc5 100644
--- a/test/src/lib/tests.py
+++ b/test/src/lib/tests.py
@@ -14,8 +14,10 @@ def my_parametrize(names, values, ids=None, **kwargs):
if len(_names) == 1:
ids = [f'{names}={v}' for v in values]
else:
- _values = [combination.values if hasattr(combination, 'values') else combination
- for combination in values]
+ _values = [
+ combination.values if hasattr(combination, 'values') else combination
+ for combination in values
+ ]
ids = [
'-'.join(f'{k}={v}' for k, v in zip(_names, combination))
for combination in _values