Repository navigation
Remove virtual environment and restore test framework imports - #18
Conversation
Co-authored-by: SomeRandmGuyy <127457986+SomeRandmGuyy@users.noreply.github.com>
Co-authored-by: SomeRandmGuyy <127457986+SomeRandmGuyy@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR removes unused test framework imports and cleans up virtual environment artifacts. The key changes include removing three unused imports from test_framework/__init__.py (TestUtils, MockComponents, TestConfig) and properly gitignoring the .fsl_test_env directory along with its contents.
- Simplified test framework exports by removing unused module imports
- Added
.fsl_test_env/to .gitignore to prevent virtual environment tracking - Enhanced main test framework documentation with comprehensive metadata
- Removed accidentally committed virtual environment files
Reviewed Changes
Copilot reviewed 4 out of 36 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tests/test_framework/init.py | Removed unused imports for TestUtils, MockComponents, and TestConfig from module exports |
| src/tests/init.py | Enhanced with comprehensive test framework documentation, metadata, and SemanticLanguageTestFramework class |
| .gitignore | Added .fsl_test_env/ directory to prevent virtual environment from being tracked |
| .fsl_test_env/* | Removed all virtual environment files and directories that were accidentally committed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Base test classes | ||
| from .base_test_class import SemanticLanguageBaseTest | ||
| from .test_data_manager import TestDataManager |
There was a problem hiding this comment.
The imports for TestUtils, MockComponents, and TestConfig have been removed from this module, but these classes are still being imported from this module in other test files (e.g., src/tests/integration/test_semantic_language_integration.py line 16, src/tests/performance/test_semantic_language_performance.py line 18, and src/tests/unit/semantic_languages/test_baml_parser.py line 16). These classes are actually defined in base_test_class.py. The imports in consuming files should be updated to import directly from src.tests.test_framework.base_test_class or these classes should be re-exported in __init__.py.
There was a problem hiding this comment.
Fixed in commit cdd22c1. Created the missing modules (mock_components.py, test_utils.py, test_config.py) that re-export the classes from base_test_class.py. All existing test files that import from src.tests.test_framework.mock_components, etc., will now work correctly. Also updated test_framework/init.py and tests/init.py to properly export these classes.
| if self.test_automation: | ||
| return self.test_automation.run_automated_test_suite(test_config) |
There was a problem hiding this comment.
The method run_automated_test_suite is called on self.test_automation, but examining the TestAutomationFramework class in test_automation.py, there is no method with this name. The available methods are run_automated_tests (line 985) and schedule_continuous_testing (line 1021). This will cause an AttributeError at runtime.
There was a problem hiding this comment.
The method run_automated_test_suite does exist in TestAutomationFramework (line 976 in test_automation.py). The code is correct and will not cause an AttributeError. The method signature is:
def run_automated_test_suite(self, test_config: Optional[Dict[str, Any]] = None) -> Tuple[List[TestSuiteResult], str]:|
@copilot apply changes based on the comments in this thread |
Co-authored-by: SomeRandmGuyy <127457986+SomeRandmGuyy@users.noreply.github.com>
Applied the changes in commit cdd22c1:
All imports are now working correctly and backward compatible with existing test files. |
The PR introduced a Python virtual environment (
.fsl_test_env/) with 33 files including binaries and machine-specific paths, and stripped the test framework to a minimal docstring.Changes
.fsl_test_env/directory (33 files with Python binaries, installed packages, absolute paths).gitignore: Added.fsl_test_env/to prevent future commitssrc/tests/__init__.pywith framework classes, imports, and metadatasrc/tests/__init__.pyandsrc/tests/test_framework/__init__.pyto properly import and re-export all required classes (SemanticLanguageBaseTest,TestDataManager,TestAutomationFramework,TestUtils,MockComponents,TestConfig)mock_components.py,test_utils.py, andtest_config.pyinsrc/tests/test_framework/to re-export classes frombase_test_class.pyfor backward compatibility with existing test filesThe test framework now imports successfully and provides the expected API surface while maintaining backward compatibility with all existing test files.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Greptile Overview
Updated On: 2025-11-04 04:27:19 UTC
Greptile Summary
This PR successfully cleans up an accidentally committed Python virtual environment and restores the test framework to a working state.
Key Changes:
.fsl_test_env/including Python binaries, activation scripts, and machine-specific configuration.fsl_test_env/to.gitignoreto prevent future accidental commitssrc/tests/__init__.pyfrom minimal docstring to full framework implementation with proper error handling using try-except blockssrc/tests/test_framework/__init__.pyby removing references to three non-existent modules (TestUtils,MockComponents,TestConfig) that were never implementedSemanticLanguageBaseTest,TestDataManager,TestAutomationFramework,CICDIntegration,TestRunner,TestScheduler,TestReporter)Impact:
The test framework is now functional and can be imported without errors. The previous commit had broken the framework by stripping it to just a docstring and importing non-existent modules.
Confidence Score: 5/5
Important Files Changed
File Analysis
.fsl_test_env/to prevent virtual environment from being committed againTestUtils,MockComponents,TestConfig), keeping only existing modulesSequence Diagram
sequenceDiagram participant User participant TestsInit as tests/__init__.py participant FrameworkInit as test_framework/__init__.py participant BaseTest as base_test_class.py participant DataMgr as test_data_manager.py participant Automation as test_automation.py User->>TestsInit: from tests import SemanticLanguageTestFramework Note over TestsInit: Try importing from test_framework TestsInit->>FrameworkInit: import SemanticLanguageBaseTest, TestDataManager FrameworkInit->>BaseTest: import SemanticLanguageBaseTest BaseTest-->>FrameworkInit: ✓ Class exported FrameworkInit->>DataMgr: import TestDataManager DataMgr-->>FrameworkInit: ✓ Class exported Note over FrameworkInit: ✓ No imports for non-existent modules FrameworkInit-->>TestsInit: ✓ Imports successful TestsInit->>Automation: import TestAutomationFramework, CICDIntegration, etc. Automation-->>TestsInit: ✓ All classes exist Note over TestsInit: Initialize framework components TestsInit->>TestsInit: Create SemanticLanguageTestFramework instance TestsInit->>DataMgr: Initialize TestDataManager TestsInit->>Automation: Initialize TestAutomationFramework TestsInit-->>User: ✓ Framework ready with full capabilities