From 3f42a51c5be6e5c9830daa22c00d4bd688208e83 Mon Sep 17 00:00:00 2001 From: GroM Date: Thu, 25 Jul 2024 10:16:23 +0200 Subject: [PATCH] Fix unit test again --- src/ragger/utils/misc.py | 2 +- tests/unit/utils/test_misc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ragger/utils/misc.py b/src/ragger/utils/misc.py index 477a859a..0be59a59 100644 --- a/src/ragger/utils/misc.py +++ b/src/ragger/utils/misc.py @@ -78,7 +78,7 @@ def find_application(base_dir: Path, device: str, sdk: str) -> Path: output = subprocess.check_output(cmd) metadata = json.loads(output) target = Path(metadata["target_directory"]) - app = app / target / device / "release" / app_name + app = target / device / "release" / app_name else: app = app / "build" / device / "bin" / "app.elf" if not app.is_file(): diff --git a/tests/unit/utils/test_misc.py b/tests/unit/utils/test_misc.py index dbe9ab79..6fa3c033 100644 --- a/tests/unit/utils/test_misc.py +++ b/tests/unit/utils/test_misc.py @@ -48,7 +48,7 @@ def test_find_application_ok_rust(self): os.chdir(app_path) cmd = ["cargo", "build", "--release"] result = misc.find_application(app_path, device, sdk) - expected = app_path / "target" / device / "release" / appname + expected = dir_path / app_path / "target" / device / "release" / appname self.assertEqual(result, expected) def test_find_application_nok_not_dir(self):