diff --git a/tagstudio/tests/test_driver.py b/tagstudio/tests/test_driver.py index 65882d68..240406f9 100644 --- a/tagstudio/tests/test_driver.py +++ b/tagstudio/tests/test_driver.py @@ -53,9 +53,12 @@ def test_evaluate_path_last_lib_not_exists(): def test_evaluate_path_last_lib_present(): # Given - settings = QSettings() with TemporaryDirectory() as tmpdir: + settings_file = tmpdir + "/test_settings.ini" + settings = QSettings(settings_file, QSettings.Format.IniFormat) settings.setValue(SettingItems.LAST_LIBRARY, tmpdir) + settings.sync() + makedirs(Path(tmpdir) / TS_FOLDER_NAME) driver = TestDriver(settings) diff --git a/tagstudio/tests/test_library.py b/tagstudio/tests/test_library.py index 26657e9f..25f1303b 100644 --- a/tagstudio/tests/test_library.py +++ b/tagstudio/tests/test_library.py @@ -1,4 +1,4 @@ -from pathlib import Path, PureWindowsPath +from pathlib import Path from tempfile import TemporaryDirectory import pytest @@ -264,28 +264,6 @@ def test_preferences(library): assert library.prefs(pref) == pref.default -def test_save_windows_path(library, generate_tag): - # pretend we are on windows and create `Path` - - entry = Entry( - path=PureWindowsPath("foo\\bar.txt"), - folder=library.folder, - fields=library.default_fields, - ) - tag = generate_tag("win_path") - tag_name = tag.name - - library.add_entries([entry]) - # library.add_tag(tag) - library.add_field_tag(entry, tag, create_field=True) - - results = library.search_library(FilterState(tag=tag_name)) - assert results - - # path should be saved in posix format - assert str(results[0].path) == "foo/bar.txt" - - def test_remove_entry_field(library, entry_full): title_field = entry_full.text_fields[0]