Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 486c2b3

Browse files
Merge pull request #89 from codecov/thiago/b/checking-output-command
Checking output of command
2 parents e6b8205 + 62f2e25 commit 486c2b3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

codecov_cli/commands/labelanalysis.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ def collect_tests(self):
8787
return [
8888
x
8989
for x in subprocess.run(
90-
["python", "-m", "pytest", "-q", "--collect-only"], capture_output=True
90+
["python", "-m", "pytest", "-q", "--collect-only"],
91+
capture_output=True,
92+
check=True,
9193
)
9294
.stdout.decode()
9395
.split()
@@ -103,9 +105,11 @@ def do_something_with_result(self, result):
103105
)
104106
all_labels = set(all_labels)
105107
all_labels = [x.rsplit("[", 1)[0] if "[" in x else x for x in all_labels]
106-
pprint.pprint(all_labels)
107108
# Not safe from the customer perspective, in general, probably.
108109
# This is just to check it working
109110
command_array.extend(all_labels)
110-
print(command_array)
111-
subprocess.run(command_array)
111+
logger.info(
112+
"Running Pytest command",
113+
extra=dict(extra_log_attributes=dict(command_array=command_array)),
114+
)
115+
subprocess.run(command_array, check=True)

0 commit comments

Comments
 (0)