diff --git a/conftest.py b/conftest.py index eca4c17db..a74538d50 100644 --- a/conftest.py +++ b/conftest.py @@ -205,6 +205,13 @@ def reset_config(): if item_name.name != "mscolab.db": item_name.unlink() + # Remove the client-side "work locally" cache. create_local_operation_file reuses an + # existing FTML file, so stale waypoints would leak into any later test (or repeated + # run of the same test) that toggles the work-locally mode. + local_colabdata = constants.ROOT_DIR / "local_colabdata" + if local_colabdata.exists(): + shutil.rmtree(local_colabdata, ignore_errors=True) + generate_initial_config() create_msui_settings_file("{}") read_config_file() diff --git a/tests/_test_msui/test_mscolab_merge_waypoints.py b/tests/_test_msui/test_mscolab_merge_waypoints.py index 5acc261e5..aff0ba6c0 100644 --- a/tests/_test_msui/test_mscolab_merge_waypoints.py +++ b/tests/_test_msui/test_mscolab_merge_waypoints.py @@ -48,7 +48,7 @@ def setup(self, qtbot, mscolab_app, mscolab_server): self.window = msui.MSUIMainWindow(local_operations_data=ROOT_DIR) self.window.create_new_flight_track() self.emailid = 'merge@alpha.org' - self.local_mscolab_data = ROOT_DIR / "local_mscolab_data" + self.local_mscolab_data = ROOT_DIR / "local_colabdata" yield self.window.mscolab.logout() mslib.utils.auth.del_password_from_keyring("merge@alpha.org")