From 5fc540ee9d151597862a39267ea3efd13fa4025a Mon Sep 17 00:00:00 2001 From: tekktrik Date: Wed, 21 Feb 2024 04:21:53 -0500 Subject: [PATCH] Update windows testing --- Makefile | 6 +++--- circfirm/backend.py | 2 +- tests/helpers.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3eeee10..65f908b 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,9 @@ test-linux: test-windows: mkdir testmount subst T: testmount - copy tests\assets\info_uf2.txt T:\ + copy tests\assets\info_uf2.txt T: coverage run -m pytest coverage report coverage html - subst testmount /d - rmdir testmount /s + subst T: /d + rmdir testmount /s /q diff --git a/circfirm/backend.py b/circfirm/backend.py index 15a7dc2..f2d60bb 100644 --- a/circfirm/backend.py +++ b/circfirm/backend.py @@ -53,7 +53,7 @@ def _find_device(filename: str) -> Optional[str]: bootout_file = pathlib.Path(partition.mountpoint) / filename if bootout_file.exists(): return partition.mountpoint - except PermissionError: + except PermissionError: # pragma: no cover pass return None diff --git a/tests/helpers.py b/tests/helpers.py index 6e4a313..49206c1 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -21,7 +21,7 @@ def get_mount() -> str: """Get the mounted drive.""" if platform.system() == "Windows": # pragma: no cover mount_location = "T:\\" - else: + else: # pragma: no cover mount_location = os.path.join(os.path.curdir, "testmount") assert os.path.exists(mount_location) assert os.path.isdir(mount_location)