Skip to content

Commit 9774c16

Browse files
Merge pull request #758 from VWS-Python/simpler-custom-linters
Use no:terminal for simpler, more explicit parsing
2 parents 585a3cb + 9770088 commit 9774c16

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ci/custom_linters.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ def _tests_from_pattern(ci_pattern: str) -> Set[str]:
2929
From a CI pattern, get all tests ``pytest`` would collect.
3030
"""
3131
tests: Set[str] = set([])
32-
args = ['pytest', '--collect-only', ci_pattern, '-q']
32+
args = ['pytest', '-p', 'no:terminal', '--collect-only', ci_pattern]
3333
result = subprocess.run(args=args, stdout=subprocess.PIPE, check=True)
34-
output = result.stdout
35-
for line in output.splitlines():
36-
if line and not line.startswith(b'no tests ran in'):
37-
tests.add(line.decode())
38-
34+
tests = set(result.stdout.decode().splitlines())
3935
return tests
4036

4137

0 commit comments

Comments
 (0)