Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss committed Feb 26, 2024
1 parent 9f755f4 commit f0b8bcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,15 @@ def reset_config():
"""Reset the configuration directory used in the tests (tests.constants.ROOT_FS) after every test
"""
# Ideally this would just be constants.ROOT_FS.removetree("/"), but SQLAlchemy complains if the SQLite file is deleted.
# Also, on Windows there are issues with files in msui/testdata being held open in another process, so those are
# excluded as well. This shouldn't be a problem since they are meant to be static anyway.
for e in constants.ROOT_FS.walk.files(exclude=["mscolab.db"]):
if fs.path.isbase("/msui/testdata", e):
continue
constants.ROOT_FS.remove(e)
for e in constants.ROOT_FS.walk.dirs(search="depth"):
if e == "/msui" or fs.path.isbase("/msui/testdata", e):
continue
constants.ROOT_FS.removedir(e)

generate_initial_config()
Expand Down

0 comments on commit f0b8bcb

Please sign in to comment.