Skip to content
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

[ENH] enable check_estimator and QuickTester.run_tests to work with skip marked pytest tests (issue #2419) #6233

Merged
merged 7 commits into from
Jun 1, 2024

Conversation

YelenaYY
Copy link
Contributor

@YelenaYY YelenaYY commented Mar 29, 2024

Reference Issues/PRs:

Fixes #2419.

What does this implement/fix? Explain your changes.

Ensure check_estimator and QuickTester.run_tests work with skipped pytest tests.
Added exception handling for NaiveForecaster skip exceptions in QuickTester.run_tests.

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

No new dependency introduced

What should a reviewer concentrate their feedback on?

Nothing specific.
Following the right conventions.

Did you add any tests for the change?

No tests added

Any other comments?

No

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the sktime root directory (not the CONTRIBUTORS.md). Common badges: code - fixing a bug, or adding code logic. doc - writing or improving documentation or docstrings. bug - reporting or diagnosing a bug (get this plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • Optionally, for added estimators: I've added myself and possibly to the maintainers tag - do this if you want to become the owner or maintainer of an estimator you added.
    See here for further details on the algorithm maintainer role.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

Copy link
Collaborator

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

Interesting!
I think that's a suitable solution! Nice!

Questions/comments:

  • the test that all is passed is failing. I think it should now check, all skipped or passed? Perhaps, for safety, also check that less than 10% are skipped or similar?
  • is importing from _pytest safe? That is, is Skipped a public object? Or is it private, and it can change without prior notice?

…sts passed or skipped, and less than 10% are skipped.

(PR: [ENH] ensure check_estimator and QuickTester.run_tests work with skipped pytest tests (issue sktime#2419) sktime#6233)
@YelenaYY YelenaYY requested a review from fkiraly April 9, 2024 08:53
@fkiraly fkiraly changed the title [ENH] ensure check_estimator and QuickTester.run_tests work with skipped pytest tests (issue #2419) [ENH] ensure check_estimator and QuickTester.run_tests work with skipped pytest tests (issue #2419) Jun 1, 2024
@fkiraly fkiraly changed the title [ENH] ensure check_estimator and QuickTester.run_tests work with skipped pytest tests (issue #2419) [ENH] enable check_estimator and QuickTester.run_tests work with skip marked pytest tests (issue #2419) Jun 1, 2024
@fkiraly fkiraly added module:tests test framework functionality - only framework, excl specific tests enhancement Adding new functionality labels Jun 1, 2024
@fkiraly fkiraly changed the title [ENH] enable check_estimator and QuickTester.run_tests work with skip marked pytest tests (issue #2419) [ENH] enable check_estimator and QuickTester.run_tests to work with skip marked pytest tests (issue #2419) Jun 1, 2024
@fkiraly fkiraly merged commit 3e41e7e into sktime:main Jun 1, 2024
19 of 68 checks passed
geetu040 pushed a commit to geetu040/sktime that referenced this pull request Jun 4, 2024
…th skip marked `pytest` tests (issue sktime#2419) (sktime#6233)

#### Reference Issues/PRs: 
Fixes sktime#2419. 

#### What does this implement/fix? Explain your changes.
Ensure check_estimator and QuickTester.run_tests work with skipped
pytest tests.
Added exception handling for NaiveForecaster skip exceptions in
QuickTester.run_tests.
fkiraly added a commit that referenced this pull request Jun 13, 2024
Reverts parts of #6233 which cause
`check_estimator` based tests in third party libraries to be always
skipped.

This is due to `QuickTester.run_tests` propagating the skip conditoin
up, affecting the entire test in the 3rd party package instead of just a
single `sktime` test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality module:tests test framework functionality - only framework, excl specific tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] ensure check_estimator and QuickTester.run_tests work with skipped pytest tests
2 participants