fix: move test artifacts to tmp directory and update gitignore

- Create tmp/test_artifacts/ directory for test storage
- Add tmp/ to .gitignore to exclude test artifacts from version control
- Update test files to use project tmp directory instead of system temp
- Add test-specific path constants for consistent configuration
- Prevent asset_registry.json from being overwritten by tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tegwick 2025-10-19 21:39:40 +02:00
parent 501b64089f
commit 4bcc178f43
4 changed files with 102 additions and 57 deletions

View file

@ -45,7 +45,10 @@ class TestFinalAssetManagementIntegration:
@pytest.fixture
def integration_workspace(self):
"""Create a comprehensive test workspace with realistic data."""
temp_dir = Path(tempfile.mkdtemp(prefix="asset_integration_"))
# Use project tmp directory instead of system temp
project_root = Path(__file__).parent.parent
temp_dir = project_root / "tmp" / "test_artifacts" / f"integration_{int(time.time())}"
temp_dir.mkdir(parents=True, exist_ok=True)
# Create realistic project structure
project_dir = temp_dir / "test_project"
@ -92,7 +95,11 @@ Content for comprehensive testing of the asset management system.
def asset_manager(self, integration_workspace):
"""Initialize AssetManager for integration testing."""
storage_path = integration_workspace / "asset_storage"
manager = AssetManager(storage_path=storage_path)
registry_path = integration_workspace / "test_registry.json"
manager = AssetManager(
storage_path=storage_path,
registry_path=registry_path
)
return manager
def test_complete_ecosystem_initialization(self, integration_workspace):
@ -505,7 +512,10 @@ class TestAssetManagementPerformanceBenchmarks:
@pytest.fixture
def benchmark_workspace(self):
"""Create large-scale test workspace for benchmarking."""
temp_dir = Path(tempfile.mkdtemp(prefix="asset_benchmark_"))
# Use project tmp directory instead of system temp
project_root = Path(__file__).parent.parent
temp_dir = project_root / "tmp" / "test_artifacts" / f"benchmark_{int(time.time())}"
temp_dir.mkdir(parents=True, exist_ok=True)
# Create variety of file types and sizes
file_types = [