Skip to content

updating tests#112

Open
djarecka wants to merge 5 commits intosensein:fix_json_op_issuefrom
djarecka:tests_updates
Open

updating tests#112
djarecka wants to merge 5 commits intosensein:fix_json_op_issuefrom
djarecka:tests_updates

Conversation

@djarecka
Copy link
Copy Markdown
Contributor

@djarecka djarecka commented Apr 9, 2026

  • creating conftest.py for shared functions;
  • updating ner_test to use python api instead of cli;
  • updating config file to use gpt-4o-mini to be more consistent

…ython api; updating config file to use gpt-4o-mini to be more consistent
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the test suite by centralizing environment variable loading and test skipping logic into a shared conftest.py file. It also updates the NER tests to directly utilize the StructSenseFlow application logic instead of the CLI runner, supported by a new extraction-only configuration file. The review feedback suggests improving the test fixtures by using the logging module instead of print and ensuring that the environment-loading fixture is explicitly invoked in the NER tests to prevent potential failures due to missing configuration.

Copy link
Copy Markdown

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 updates the test suite to centralize shared test utilities in conftest.py, migrate the NER test from invoking the CLI to calling the Python API directly, and align the NER test config to use gpt-4o-mini for consistency.

Changes:

  • Added src/tests/conftest.py with shared env-loading fixture and an OpenRouter skip marker.
  • Updated task_detection_test.py to use the shared fixture/skip logic.
  • Reworked ner_test.py to run StructSenseFlow directly using a new extraction-only YAML config.

Reviewed changes

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

File Description
src/tests/task_detection_test.py Switched to shared env fixture and shared OpenRouter skip marker.
src/tests/ner_test.py Migrated NER test from CLI invocation to direct StructSenseFlow API execution using YAML config.
src/tests/conftest.py Introduced shared load_env fixture and skip_if_no_openrouter marker.
src/tests/configs/ner-config_extractonly.yaml Added extraction-only test config using openrouter/openai/gpt-4o-mini.

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (fix_json_op_issue@3e4ef2b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/tests/ner_test.py 61.53% 5 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             fix_json_op_issue     #112   +/-   ##
====================================================
  Coverage                     ?   15.48%           
====================================================
  Files                        ?       28           
  Lines                        ?     6850           
  Branches                     ?        0           
====================================================
  Hits                         ?     1061           
  Misses                       ?     5789           
  Partials                     ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

djarecka and others added 3 commits April 9, 2026 17:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.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.

3 participants