From dcf8b7134394255cf86cc0beabd25fe24849ae40 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 4 Mar 2024 10:32:10 -0800 Subject: [PATCH] test: Update tests to properly execute all code. --- tests/samples/{tsp_script.py => tsp_script.tsp} | 1 - tests/test_smu.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) rename tests/samples/{tsp_script.py => tsp_script.tsp} (98%) diff --git a/tests/samples/tsp_script.py b/tests/samples/tsp_script.tsp similarity index 98% rename from tests/samples/tsp_script.py rename to tests/samples/tsp_script.tsp index 8107bd15..60da9791 100644 --- a/tests/samples/tsp_script.py +++ b/tests/samples/tsp_script.tsp @@ -1,3 +1,2 @@ """Sample script used in test_smu.py.""" - print("TEK") diff --git a/tests/test_smu.py b/tests/test_smu.py index 4345be73..679a8809 100644 --- a/tests/test_smu.py +++ b/tests/test_smu.py @@ -49,7 +49,7 @@ def test_smu( # noqa: PLR0915 assert "Query" in stdout smu.load_script( - file_path=f"{Path(os.path.realpath(__file__)).parent}/samples/tsp_script.py", + file_path=f"{Path(os.path.realpath(__file__)).parent}/samples/tsp_script.tsp", run_script=True, to_nv_memory=True, ) @@ -61,7 +61,7 @@ def test_smu( # noqa: PLR0915 assert "loadfuncs()" in stdout smu.expect_esr(0) smu.load_script( - file_path=f"{Path(os.path.realpath(__file__)).parent}/samples/tsp_script.py", + file_path=f"{Path(os.path.realpath(__file__)).parent}/samples/tsp_script.tsp", script_name="tsp_function", ) stdout = capsys.readouterr().out