Skip to content

Add missing test coverage#1326

Open
AkhiChalasani wants to merge 1 commit into
Future-House:mainfrom
AkhiChalasani:improve/test-gap-0509
Open

Add missing test coverage#1326
AkhiChalasani wants to merge 1 commit into
Future-House:mainfrom
AkhiChalasani:improve/test-gap-0509

Conversation

@AkhiChalasani
Copy link
Copy Markdown

@AkhiChalasani AkhiChalasani commented May 9, 2026

Summary

  • Created test file test__ldp_shims.py
  • Created test file test_openalex.py
  • Created test file test_exceptions.py

Closes #1261


Note

Medium Risk
Low functional risk (tests only), but these tests may fail CI because they import paper_qa while the codebase appears to use the paperqa module name.

Overview
Adds three new pytest files that provide minimal smoke test coverage by importing exceptions, openalex, and _ldp_shims and 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.

- Created test file test__ldp_shims.py
- Created test file test_openalex.py
- Created test file test_exceptions.py

Closes Future-House#1261
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 9, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread tests/test__ldp_shims.py
"""Tests for _ldp_shims."""

import pytest
from paper_qa import _ldp_shims
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b000b7f. Configure here.

Comment thread tests/test_exceptions.py
"""Tests for exceptions."""

import pytest
from paper_qa import exceptions
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b000b7f. Configure here.

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

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TimeoutError: Timeout (60.00999999999663 secs): rate limit for key: ('client', 'gpt-5.2-2025-12-11')

1 participant