mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user