Use pytest.mark.skip for ChemRxiv tests instead of comments#86
Conversation
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## skip-chemrxiv #86 +/- ##
==============================================
Coverage 88.59% 88.59%
==============================================
Files 13 13
Lines 526 526
==============================================
Hits 466 466
Misses 60 60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
@copilot mypy.....................................................................Failed
tests/test_from_identifier.py:27: error: Argument 2 to "_create_test_param" has incompatible type "str | None"; expected "str" [arg-type] |
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Fixed in 41eb096. Changed the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the test suite to use pytest's built-in skip mechanism instead of commenting out problematic test cases. It enables the previously commented ChemRxiv test case and marks it to be skipped with a clear reason.
Changes:
- Added optional
skip_reasonfield to theReferenceCasedataclass - Uncommented the ChemRxiv test case and marked it with skip_reason="ChemRxiv API broken"
- Introduced
_create_test_paramhelper functions in both test files to reduce code duplication and properly handle test skipping
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/cases.py | Added skip_reason field to ReferenceCase dataclass and uncommented the ChemRxiv test case with skip reason |
| tests/test_output.py | Added _create_test_param helper function and updated parametrize decorators to use pytest.param with skip marks |
| tests/test_from_identifier.py | Added _create_test_param helper function and updated parametrize decorator to use pytest.param with skip marks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
skip_reasonfield to ReferenceCase dataclass💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.