test: improve test coverage
Description
This MR adds comprehensive pytest test cases to improve code coverage.
The goal is to achieve higher (target 100%) test coverage without modifying any existing application logic or functionality.
Changes Made
-
Added new test file:
tests/test_app.py
-
Updated and added test cases in:
tests/test_client.pytests/test_repro_timeout.py
-
Ensured execution of
app.pythrough mocked Streamlit components -
Added mocks for external dependencies (e.g., GitLab, async calls)
-
Covered:
- Normal execution paths
- Conditional branches (if/else)
- Edge cases
- Exception handling paths
Key Points
- No changes were made to production code
- All functionality remains unchanged
- Tests are fully isolated using mocking
- No real API calls or UI rendering during tests
How to Test
Run the following command:
pytest --cov=.
Expected Result
- Increased coverage for:
tests/test_client.pytests/test_repro_timeout.py
- Target: 100% coverage
Edited by Damanagari Sathwika