From d7da8c6851246255736f96d1728a00921baaad56 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 24 Oct 2022 11:26:43 +0100 Subject: [PATCH] Absolute the intended result path Because testing on Windows is going to add a drive to any absolute path, and in the tests we don't want to make it specific to something like that, take the absolute path to test against and then absolute it again which is pretty much a NOP on a Unix-a-like, but will add the drive on Windows. --- tests/test_path.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_path.py b/tests/test_path.py index 42818236c..77b4f3d85 100644 --- a/tests/test_path.py +++ b/tests/test_path.py @@ -37,7 +37,7 @@ def path_tester(obj_type: Type[App[None]], str_type: Type[App[None]], intended_r ) def test_relative_path(): - path_tester(RelativePathObjectApp, RelativePathStrApp, ((Path(__file__).absolute().parent ) / "test.css")) + path_tester(RelativePathObjectApp, RelativePathStrApp, ((Path(__file__).absolute().parent ) / "test.css").absolute()) def test_absolute_path(): - path_tester(AbsolutePathObjectApp, AbsolutePathStrApp, Path("/tmp/test.css")) + path_tester(AbsolutePathObjectApp, AbsolutePathStrApp, Path("/tmp/test.css").absolute())