From d87f4211002a3f92d0ddc9f9aada80956d8e8cea Mon Sep 17 00:00:00 2001 From: Pierre Delaunay Date: Tue, 6 Feb 2024 09:47:42 -0500 Subject: [PATCH] - --- milabench/cli/dry.py | 9 ++++++--- tests/test_regression.py | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/milabench/cli/dry.py b/milabench/cli/dry.py index 3bcdd53d4..499db1611 100644 --- a/milabench/cli/dry.py +++ b/milabench/cli/dry.py @@ -80,9 +80,12 @@ def print(self, *args, **kwargs): print(*args, **kwargs) def section(self, title): - self.comment("---") - self.comment(title) - self.comment("=" * len(title)) + self.echo("---") + self.echo(title) + self.echo("=" * len(title)) + + def echo(self, msg): + self.print(f"echo \"{msg}\"") def comment(self, cmt): self.print(f"# {cmt}") diff --git a/tests/test_regression.py b/tests/test_regression.py index afda6929c..97a4ba93e 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -19,8 +19,12 @@ def test_command_regression(capsys, file_regression): args = arguments() args.withenv = False - cli_dry(args) - + + try: + cli_dry(args) + except FileNotFoundError: + pytest.skip("Milabench not installed") + all = capsys.readouterr() stdout = all.out assert stdout != ""