Skip to content

Commit 9b171d4

Browse files
committed
Cleanup devtest prints
1 parent 702e812 commit 9b171d4

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

devtest.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import subprocess
2020
import sys
21+
import textwrap
2122
import venv
2223
from concurrent.futures import ThreadPoolExecutor
2324
from pathlib import Path
@@ -85,11 +86,16 @@ def run(cmd: str) -> subprocess.CompletedProcess:
8586

8687
fail = False
8788
for result in executor.map(lambda x: run(x), tests):
88-
print("#####################################")
89-
print("# Running {}".format(" ".join(result.args)))
90-
print(result.stdout.decode())
91-
print("#####################################")
92-
print()
89+
print(
90+
textwrap.dedent(
91+
f"""\
92+
#####################################
93+
# Running {" ".join(result.args)}
94+
{textwrap.indent(result.stdout.decode(), " ")}
95+
#####################################
96+
"""
97+
)
98+
)
9399
if result.returncode:
94100
fail = True
95101

0 commit comments

Comments
 (0)