Skip to content

Add more tests#5

Merged
xprilion merged 1 commit into
mainfrom
dev
Apr 26, 2026
Merged

Add more tests#5
xprilion merged 1 commit into
mainfrom
dev

Conversation

@xprilion
Copy link
Copy Markdown
Owner

This pull request adds comprehensive backend test coverage for core modules including the agent loop, app entrypoint, Celery integration, and database engine. It also improves test coverage reporting and configuration, updates documentation, and refines the test runner setup.

Testing and Coverage Improvements

  • Adds pytest-cov to backend dev dependencies and configures coverage reporting in pyproject.toml for more accurate and maintainable test coverage metrics.
  • Refactors the Makefile to split test-coverage into backend and frontend targets, and ensures both are run with coverage reports.
  • Updates test counts in README.md to reflect the expanded backend and frontend test suites.

New Backend Test Suites

  • Adds test_agent_loop.py with extensive async tests for agent tool execution, approval handling, undo/compact actions, agent turn processing, submission loop, and LLM call helpers.
  • Adds test_app.py to verify FastAPI app creation, middleware, router registration, and main module entrypoint.
  • Adds test_celery_app.py to validate Celery app instance, configuration, and routing.
  • Adds test_db_engine.py to check database engine configuration, session creation, and context variable usage.

Test Infrastructure

  • Updates backend test fixtures in conftest.py to ensure minimal app state initialization by setting app.state.config when lifespan is skipped.

@xprilion xprilion merged commit 6d099f0 into main Apr 26, 2026
3 of 4 checks passed
@github-actions
Copy link
Copy Markdown

Qodana for Python

158 new problems were found

Inspection name Severity Problems
Unused imports 🔶 Warning 26
Unreachable code 🔶 Warning 1
Redundant character escape 🔶 Warning 1
Unused local symbols ◽️ Notice 57
Accessing a protected member of a class or a module ◽️ Notice 38
Unclear exception clauses ◽️ Notice 21
Shadowing names from outer scopes ◽️ Notice 8
Method is not declared static ◽️ Notice 3
PEP 8 naming convention violation ◽️ Notice 3

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant