Skip to content

Commit

Permalink
Serialize and check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Feb 29, 2024
1 parent a509f24 commit 11544f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meta_package_manager/bar_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def print_menu(self) -> None:
for mpm_args, (runnable, up_to_date, version, error) in plugin.ranked_mpm:
print(
f"{' '.join(mpm_args)} | runnable: {runnable} | up to date: {up_to_date}"
f" | version: {version} | error: {error}"
f" | version: {version} | error: {error!r}"
)

else:
Expand Down
8 changes: 7 additions & 1 deletion meta_package_manager/tests/test_bar_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,14 @@ def test_plugin_shell_invocation(self, shell_args):
)

assert not process.stderr
assert process.stdout
assert process.returncode == 0
assert process.stdout
for line in process.stdout.splitlines():
assert re.match(
r"^.+ \| runnable: \S+ \| up to date: \S+"
r" \| version: .+ \| error: .*$",
line,
)

@shell_python_args
def test_python_shell_invocation(self, shell_args, python_args):
Expand Down

0 comments on commit 11544f3

Please sign in to comment.