Skip to content

[ENH] tests(lookup): isolate lookup tests to dedicated mock package#476

Open
arnavk23 wants to merge 34 commits intosktime:mainfrom
arnavk23:fix/issue-114-restrict-lookup-tests
Open

[ENH] tests(lookup): isolate lookup tests to dedicated mock package#476
arnavk23 wants to merge 34 commits intosktime:mainfrom
arnavk23:fix/issue-114-restrict-lookup-tests

Conversation

@arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Nov 22, 2025

Reference Issues/PRs

Fixes #114.

What does this implement/fix? Explain your changes.

This PR isolates lookup tests from the main package by introducing a dedicated test-only package, skbase.tests.mock_package.

The lookup tests scan this small controlled package instead of scanning skbase directly. This decouples lookup tests from unrelated production-package refactors and prevents brittle failures when internals outside lookup change.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

  • Whether the new mock_package expectations accurately model intended lookup behavior.
  • Whether test coverage still protects public and non-public module/item filtering semantics.

Any other comments?

The intent is to make lookup tests deterministic and focused on lookup behavior, not on unrelated evolution of the production package structure.

PR checklist

For all contributions
  • I've reviewed the project documentation on contributing
  • I've added myself to the list of contributors.
  • The PR title starts with either [ENH], [CI/CD], [MNT], [DOC], or [BUG] indicating whether
    the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions
  • Unit tests have been added covering code functionality
  • Appropriate docstrings have been added (see documentation standards)
  • New public functionality has been added to the API Reference

@arnavk23 arnavk23 changed the title tests(lookup): isolate lookup tests to dedicated mock package [ENH] tests(lookup): isolate lookup tests to dedicated mock package Nov 22, 2025
__author__: List[str] = ["fkiraly", "RNKuhns"]


class Parent(BaseObject):

Check warning

Code scanning / CodeQL

`__eq__` not overridden when adding attributes Warning test

The class 'Parent' does not override
'__eq__'
, but adds the new attribute
a
.
The class 'Parent' does not override
'__eq__'
, but adds the new attribute
b
.
The class 'Parent' does not override
'__eq__'
, but adds the new attribute
c
.
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.83%. Comparing base (306958d) to head (188b76a).
⚠️ Report is 186 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #476      +/-   ##
==========================================
- Coverage   85.07%   83.83%   -1.24%     
==========================================
  Files          45       52       +7     
  Lines        3015     3904     +889     
==========================================
+ Hits         2565     3273     +708     
- Misses        450      631     +181     

☔ 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.

@arnavk23 arnavk23 force-pushed the fix/issue-114-restrict-lookup-tests branch 2 times, most recently from 0c30a63 to 6e00981 Compare December 15, 2025 15:45
arnavk23 and others added 11 commits December 15, 2025 21:19
…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.
Copy link
Contributor

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

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.

arnavk23 and others added 3 commits February 14, 2026 12:56
…strict the lookup tests to only those that are relevant to the issue at hand.
@arnavk23 arnavk23 requested a review from fkiraly March 6, 2026 05:32
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.

Reducing scope of test_get_package_metadata_returns_expected_results?

2 participants