Skip to content

app/test_rag_system.py is not run in CI and has pre-existing bugs that make the suite error at setup #136

Description

@defangdevs

Noticed while working on #110 (PR #135): `.github/workflows/build.yaml` only runs `ruff check`/`ruff format --check` - no test step ever executes `app/test_rag_system.py` (or the other `test_*.py` files in `app/`).

The suite also has bugs that predate my change and would make it error out immediately if it were run:

  • `setUpClass` calls `cls.rag_system.rebuild_embeddings()` with no argument, but the method requires a `knowledge_base` argument.
  • `test_compute_document_scores` calls `self.rag_system.doc_about_embeddings()` as a function, but it's an attribute (a tensor), not a method.
  • `test_cache_check_rebuild_embeddings_on_error` patches `self.rag_system.rebuild_embeddings` to a fake before capturing the "real" method to call from inside the fake, so `real_rebuild_embeddings` actually ends up bound to the fake itself - calling it recurses into itself indefinitely.

None of this blocks anything today because the suite simply never runs, but it means the tests provide no actual safety net. Worth fixing the bugs and wiring `pytest`/`unittest` into `build.yaml` in a follow-up.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions