mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Spell the Windows paths with forward slashes in the directories test
A backslash only separates on Windows, and this test also runs on the Linux that checks the Windows half. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3436e6b426
commit
6b86696648
@@ -492,8 +492,10 @@ class Directories(unittest.TestCase):
|
|||||||
self.assertNotIn("/c", config_dir.as_posix())
|
self.assertNotIn("/c", config_dir.as_posix())
|
||||||
|
|
||||||
def test_windows_keeps_settings_and_data_apart(self):
|
def test_windows_keeps_settings_and_data_apart(self):
|
||||||
with mock.patch.dict(os.environ, {"APPDATA": r"C:\roam",
|
# Forward slashes, because a backslash only separates on Windows and
|
||||||
"LOCALAPPDATA": r"C:\local"}):
|
# this test also runs on the Linux that checks the Windows half.
|
||||||
|
with mock.patch.dict(os.environ, {"APPDATA": "C:/roam",
|
||||||
|
"LOCALAPPDATA": "C:/local"}):
|
||||||
config_dir, data_dir = cfg._directories("win32")
|
config_dir, data_dir = cfg._directories("win32")
|
||||||
self.assertEqual(config_dir.as_posix(), "C:/roam/Dikte")
|
self.assertEqual(config_dir.as_posix(), "C:/roam/Dikte")
|
||||||
self.assertEqual(data_dir.as_posix(), "C:/local/Dikte")
|
self.assertEqual(data_dir.as_posix(), "C:/local/Dikte")
|
||||||
|
|||||||
Reference in New Issue
Block a user