diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-18 15:21:12 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-18 15:21:12 +0200 |
| commit | 0eab2fb9fd2006356c12830145fac067f64f7f8a (patch) | |
| tree | 0af5847aee651c27bfa9f9aa924f5cf1600ed790 /test/src/lib/test_repo.py | |
| parent | Merge pull request #9 from egor-tensin/dependabot/docker/alpine-3.24 (diff) | |
| download | cimple-0eab2fb9fd2006356c12830145fac067f64f7f8a.tar.gz cimple-0eab2fb9fd2006356c12830145fac067f64f7f8a.zip | |
workflows/ci: add Python linting
Diffstat (limited to 'test/src/lib/test_repo.py')
| -rw-r--r-- | test/src/lib/test_repo.py | 16 |
1 files changed, 13 insertions, 3 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 |
