File tree Expand file tree Collapse file tree 2 files changed +5
-24
lines changed Expand file tree Collapse file tree 2 files changed +5
-24
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,12 @@ def test_evaluate_path_last_lib_not_exists():
5353
5454def test_evaluate_path_last_lib_present ():
5555 # Given
56- settings = QSettings ()
5756 with TemporaryDirectory () as tmpdir :
57+ settings_file = tmpdir + "/test_settings.ini"
58+ settings = QSettings (settings_file , QSettings .Format .IniFormat )
5859 settings .setValue (SettingItems .LAST_LIBRARY , tmpdir )
60+ settings .sync ()
61+
5962 makedirs (Path (tmpdir ) / TS_FOLDER_NAME )
6063 driver = TestDriver (settings )
6164
Original file line number Diff line number Diff line change 1- from pathlib import Path , PureWindowsPath
1+ from pathlib import Path
22from tempfile import TemporaryDirectory
33
44import pytest
@@ -264,28 +264,6 @@ def test_preferences(library):
264264 assert library .prefs (pref ) == pref .default
265265
266266
267- def test_save_windows_path (library , generate_tag ):
268- # pretend we are on windows and create `Path`
269-
270- entry = Entry (
271- path = PureWindowsPath ("foo\\ bar.txt" ),
272- folder = library .folder ,
273- fields = library .default_fields ,
274- )
275- tag = generate_tag ("win_path" )
276- tag_name = tag .name
277-
278- library .add_entries ([entry ])
279- # library.add_tag(tag)
280- library .add_field_tag (entry , tag , create_field = True )
281-
282- results = library .search_library (FilterState (tag = tag_name ))
283- assert results
284-
285- # path should be saved in posix format
286- assert str (results [0 ].path ) == "foo/bar.txt"
287-
288-
289267def test_remove_entry_field (library , entry_full ):
290268 title_field = entry_full .text_fields [0 ]
291269
You can’t perform that action at this time.
0 commit comments