From 34d5551160b7d9309bb87a7f67b54c1e0dba46b3 Mon Sep 17 00:00:00 2001 From: Eisinger Date: Fri, 8 Nov 2024 18:05:34 +0100 Subject: [PATCH] Fixed test_cli.py and removed 'skipped' --- tests/test_cli.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 93fd0c5..6693d09 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -7,7 +7,7 @@ def check_command(cmd: str, expected: str | None = None): ret = subprocess.check_output( - "python ..\\..\\..\\" + cmd, shell=True, text=True + cmd, shell=True, text=True ).strip() if expected is None: print("OUTPUT:", ret) @@ -15,17 +15,15 @@ def check_command(cmd: str, expected: str | None = None): assert ret.startswith(expected), f"{cmd}: {ret} != {expected}" -@pytest.mark.skip("This tests need to be updated") def test_cli(): os.chdir(str(Path(__file__).parent / "data" / "BouncingBall3D")) check_command("sim-explorer -V", "0.1.0") check_command( "sim-explorer BouncingBall3D.cases --info", - "ARGS Namespace(cases='BouncingBall3D.cases'", + "Cases BouncingBall3D. Simple sim explorer with the 3D BouncingBall FMU (3D position and", ) - expected = "ARGS Namespace(cases='BouncingBall3D.cases', info=False, run='restitution', Run=None)" - check_command("sim-explorer BouncingBall3D.cases --run restitution", expected) - check_command("sim-explorer BouncingBall3D.cases --Run base") + check_command("sim-explorer BouncingBall3D.cases --run restitution", "") + check_command("sim-explorer BouncingBall3D.cases --Run base", "") if __name__ == "__main__":