-
Notifications
You must be signed in to change notification settings - Fork 28
[ENH] tests(lookup): isolate lookup tests to dedicated mock package #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[ENH] tests(lookup): isolate lookup tests to dedicated mock package #476
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
| __author__: List[str] = ["fkiraly", "RNKuhns"] | ||
|
|
||
|
|
||
| class Parent(BaseObject): |
Check warning
Code scanning / CodeQL
`__eq__` not overridden when adding attributes Warning test
'__eq__'
a
The class 'Parent' does not override
'__eq__'
b
The class 'Parent' does not override
'__eq__'
c
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
==========================================
- Coverage 85.07% 83.72% -1.36%
==========================================
Files 45 52 +7
Lines 3015 3889 +874
==========================================
+ Hits 2565 3256 +691
- Misses 450 633 +183 ☔ 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 all tests pass and fixed the pre-commit failing check by making change to test_base.py to comply with flake8 |
|
@fkiraly all tests pass and the pr is rebased. |
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