Add missing test coverage#1326
Conversation
- Created test file test__ldp_shims.py - Created test file test_openalex.py - Created test file test_exceptions.py Closes Future-House#1261
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b000b7f. Configure here.
| """Tests for _ldp_shims.""" | ||
|
|
||
| import pytest | ||
| from paper_qa import _ldp_shims |
There was a problem hiding this comment.
Wrong package name in all test imports
High Severity
All three new test files import from paper_qa (with underscore), but the Python package is paperqa (no underscore). Every existing test and source file consistently uses from paperqa import .... None of these tests can run, so the PR adds zero test coverage.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit b000b7f. Configure here.
| """Tests for exceptions.""" | ||
|
|
||
| import pytest | ||
| from paper_qa import exceptions |
There was a problem hiding this comment.
Wrong module paths for exceptions and openalex
High Severity
Even with the package name corrected to paperqa, the imports for exceptions and openalex would still fail. These modules live under paperqa.clients (at src/paperqa/clients/exceptions.py and src/paperqa/clients/openalex.py), not directly under paperqa. The correct imports would reference paperqa.clients.exceptions and paperqa.clients.openalex.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b000b7f. Configure here.


Summary
Closes #1261
Note
Medium Risk
Low functional risk (tests only), but these tests may fail CI because they import
paper_qawhile the codebase appears to use thepaperqamodule name.Overview
Adds three new pytest files that provide minimal smoke test coverage by importing
exceptions,openalex, and_ldp_shimsand asserting the modules load.Also includes placeholder “basic” tests that currently do not exercise any behavior beyond importability.
Reviewed by Cursor Bugbot for commit b000b7f. Configure here.