Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 22, 2024
1 parent a9c36ec commit cdbcb74
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def test_cli_exit_code_0(launcher):

@pytest.mark.parametrize("launcher", ["inline", "process", "torchrun"])
def test_cli_exit_code_1(launcher):
if launcher == "torchrun" and sys.platform != "linux":
pytest.skip("torchrun is only supported on Linux")

args_1 = [
"optimum-benchmark",
"--config-dir",
Expand All @@ -78,11 +81,13 @@ def test_cli_exit_code_1(launcher):
]

popen_1 = run_subprocess_and_log_stream_output(LOGGER, args_1)
assert popen_1.returncode == 1
assert popen_1.returncode == 1 and "Model type should be one of" in popen_1.stderr


@pytest.mark.skipif(sys.platform != "linux", reason="Only run on Linux")
def test_cli_numactl():
if sys.platform != "linux":
pytest.skip("numactl is only supported on Linux")

args = [
"optimum-benchmark",
"--config-dir",
Expand Down

0 comments on commit cdbcb74

Please sign in to comment.