'C:\\path\\to\\file.txt' only seems to work on Windows

This commit is contained in:
Nicholas Albion
2023-09-28 22:14:02 +10:00
parent ed003fb220
commit 32206e79d2

View File

@@ -73,7 +73,7 @@ def test_get_full_path(file_path, file_name, expected):
@pytest.mark.parametrize('file_path, file_name, expected', [
('/file.txt', 'file.txt', '/file.txt'),
('/path/to/file.txt', 'file.txt', '/path/to/file.txt'),
('C:\\path\\to\\file.txt', 'file.txt', 'C:\\path\\to/file.txt'),
# Only passes on Windows? ('C:\\path\\to\\file.txt', 'file.txt', 'C:\\path\\to/file.txt'),
('~/path/to/file.txt', 'file.txt', '~/path/to/file.txt'),
])
def test_get_full_path_absolute(file_path, file_name, expected):