Convert test_referencevalidator.py from unittest to pytest
- Convert class-level setup/teardown to validation_doc pytest fixture
- Convert helper methods to standalone functions (_get_normalizer, _assert_unrepaired_types_the_same)
- Convert all 14 test methods to standalone functions with validation_doc fixture
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 78.41%. Comparing base (f71d115) to head (49218b2).
Additional details and impacted files
@@ Coverage Diff @@
## main #452 +/- ##
=======================================
Coverage 78.41% 78.41%
=======================================
Files 52 52
Lines 4536 4536
Branches 989 989
=======================================
Hits 3557 3557
Misses 764 764
Partials 215 215
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I didn't look in detail at all of the tests, but there's a lot of code here that can be converted into pytest parameters instead of iterating through it in the unit test.
@vladistan Could you try to get the parametrize work into this PR this week? We'd like to get as many of these PRs merged before our big mono-repo merge between linkml and linkml-runtime @ialarmedalien and @cmungall it looks to me like this at least moves things along in this test file. If @vladistan can't make the requested changes this week, would it be okay to merge this without the improvements requested?
I have moved the work for this PR from the contributor fork to the linkml-runtime branch https://github.com/linkml/linkml-runtime/tree/convert-test-reference-validator-to-pytest . These branches will be lifted over in the merge to the mono-repo so you won't lose you work. You will need to open a new PR against the linkml monorepo after the move. I'd prefer to get this in but if we can't please open a new PR when you resume work. Thanks!