Skip to content

Conversation

@jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza commented Oct 27, 2025

Turns out I missed a few in #1149:

  • Anthropic different failure message
  • Confusion of 2 in citation page range vs 2 in answer content, so I switched to raw_answer with citations removed

@jamesbraza jamesbraza self-assigned this Oct 27, 2025
Copilot AI review requested due to automatic review settings October 27, 2025 18:18
@jamesbraza jamesbraza added the enhancement New feature or request label Oct 27, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses test failures caused by differences in LLM provider error messages and ambiguous test assertions. It follows up on a previous PR by fixing two remaining issues: Anthropic's different error message format for unsupported images, and confusion between the number "2" appearing in citation page ranges versus answer content.

Key Changes:

  • Updated error message assertion to handle both OpenAI and Anthropic formats
  • Changed test assertions from session.answer to session.raw_answer to avoid confusion with citation metadata

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/test_paperqa.py Modified unsupported image error check to accept multiple provider-specific error messages
packages/paper-qa-pypdf/tests/test_paperqa_pypdf.py Clarified question text and switched from answer to raw_answer for more precise validation
packages/paper-qa-pymupdf/tests/test_paperqa_pymupdf.py Clarified question text and switched from answer to raw_answer for more precise validation
packages/paper-qa-docling/tests/test_paperqa_docling.py Clarified question text and switched from answer to raw_answer for more precise validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot
Copy link

dosubot bot commented Oct 27, 2025

Documentation Updates

Checked 1 published document(s). No updates required.

How did I do? Any feedback?  Join Discord

@jamesbraza jamesbraza force-pushed the modernizing-assertions branch from abc7c9c to 5412ef2 Compare October 27, 2025 18:54
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 27, 2025
@jamesbraza jamesbraza force-pushed the modernizing-assertions branch 2 times, most recently from 8ac0db1 to d96d09c Compare October 27, 2025 19:04
@jamesbraza jamesbraza force-pushed the modernizing-assertions branch from d96d09c to fdcdb82 Compare October 27, 2025 19:24
@jamesbraza jamesbraza merged commit c9bd88c into main Oct 27, 2025
7 checks passed
@jamesbraza jamesbraza deleted the modernizing-assertions branch October 27, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants