Skip to content

Commit

Permalink
[BUG] fix test_run_test_for_class logic check if `ONLY_CHANGED_MODU…
Browse files Browse the repository at this point in the history
…LES` flag is `False` and all estimator dependencies are present (#6383)

This fixes an unreported bug pointed out by @yarnabrina in the test
`test_run_test_for_class`, in the check for the logic of
`run_test_for_class` returning an attribution of its test yes/no flag to
a reason.

If `ONLY_CHANGED_MODULES` flag is `False` and all estimator dependencies
are present, the reason returned should be `True_run_always`, but the
test checks incorrectly for another positive reason.

This is fixed - a bug with the test, not with `run_test_for_class` - as
it did not take into account properly the combination of
`ONLY_CHANGED_MODULES = False` and all dependencies present, which in
our CI occurs only in `test_all`.
  • Loading branch information
fkiraly committed May 4, 2024
1 parent c04513c commit 49d7f32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sktime/tests/tests/test_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def test_run_test_for_class():
if not dep_present:
assert not run
assert reason == "False_required_deps_missing"
elif not ONLY_CHANGED_MODULES:
assert run
assert reason == "True_run_always"
elif run:
assert reason in POS_REASONS
assert reason_wdep == reason or reason_nodep == reason
Expand Down

0 comments on commit 49d7f32

Please sign in to comment.