[ENH] tests(lookup): isolate lookup tests to dedicated mock package#476
[ENH] tests(lookup): isolate lookup tests to dedicated mock package#476arnavk23 wants to merge 30 commits intosktime:mainfrom
Conversation
…isolate tests to skbase.tests.mock_package (fix sktime#114)
…e to improve mock coverage (edge cases)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
==========================================
- Coverage 85.07% 83.65% -1.43%
==========================================
Files 45 52 +7
Lines 3015 3848 +833
==========================================
+ Hits 2565 3219 +654
- Misses 450 629 +179 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0c30a63 to
6e00981
Compare
…n mock_package modules Classes defined in test_fixtures.py should only appear in that module's metadata, not in __init__.py or test_mock_package.py where they're imported. Removed Parent, Child, ClassWithABTrue from __all__ lists to match the test's expectation that get_package_metadata only reports classes actually defined in each module (cls.__module__ == module.__name__).
…ckage Classes are imported for re-export to maintain the module's public API but are intentionally not listed in __all__ to ensure get_package_metadata only reports classes defined in each module.
for more information, see https://pre-commit.ci
fkiraly
left a comment
There was a problem hiding this comment.
Great!
There is though an entire config file which checks expectations against actuals after retrieval.
I would expect that still to happen for the mock package, but it does not - are you sure you have moved all tests over? I would at least expect the "full package expected lookup results" to be removed.
I've removed the "full package expected lookup results" from The checks for the mock package still occur through the existing tests:
This ensures that expectation checks against actual retrieval still happen for the mock package, while restricting the lookup tests by removing the broader full-package validation. |
…strict the lookup tests to only those that are relevant to the issue at hand.
for more information, see https://pre-commit.ci
Reference Issues/PRs
Fixes #114.
What does this implement/fix? Explain your changes.
Isolate the
lookuptests from the main package by introducing a dedicated test-only packageskbase.tests.mock_package. The lookup tests now scan this small controlled package instead ofskbase, preventing unrelated production refactors from breaking lookup tests.Does your contribution introduce a new dependency? If yes, which one?
What should a reviewer concentrate their feedback on?
Any other comments?
PR checklist
For all contributions
the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions