diff --git a/src/basic_memory/config.py b/src/basic_memory/config.py index ddafec11a..36ac79ec7 100644 --- a/src/basic_memory/config.py +++ b/src/basic_memory/config.py @@ -310,7 +310,7 @@ def get_project_config(project_name: Optional[str] = None) -> ProjectConfig: os_project_name = os.environ.get("BASIC_MEMORY_PROJECT", None) if os_project_name: # pragma: no cover logger.warning( - f"BASIC_MEMORY_PROJECT is not supported anymore. Use the --project flag or set the default project in the config instead. Setting default project to {os_project_name}" + f"BASIC_MEMORY_PROJECT is not supported anymore. Set the default project in the config instead. Setting default project to {os_project_name}" ) actual_project_name = project_name # if the project_name is passed in, use it @@ -341,13 +341,6 @@ def save_basic_memory_config(file_path: Path, config: BasicMemoryConfig) -> None logger.error(f"Failed to save config: {e}") -def update_current_project(project_name: str) -> None: - """Update the global config to use a different project. - - This is used by the CLI when --project flag is specified. - """ - global config - config = get_project_config(project_name) # pragma: no cover # setup logging to a single log file in user home directory diff --git a/tests/sync/test_sync_service.py b/tests/sync/test_sync_service.py index 00694e072..eac2487ed 100644 --- a/tests/sync/test_sync_service.py +++ b/tests/sync/test_sync_service.py @@ -1,6 +1,7 @@ """Test general sync behavior.""" import asyncio +import os from datetime import datetime, timezone from pathlib import Path from textwrap import dedent @@ -637,8 +638,10 @@ async def test_sync_preserves_timestamps( entity_created_epoch = file_entity.created_at.timestamp() entity_updated_epoch = file_entity.updated_at.timestamp() - assert abs(entity_created_epoch - file_stats.st_ctime) < 1 - assert abs(entity_updated_epoch - file_stats.st_mtime) < 1 # Allow 1s difference + # Allow 2s difference on Windows due to filesystem timing precision + tolerance = 2 if os.name == 'nt' else 1 + assert abs(entity_created_epoch - file_stats.st_ctime) < tolerance + assert abs(entity_updated_epoch - file_stats.st_mtime) < tolerance # Allow tolerance difference @pytest.mark.asyncio