Skip to content

[BUG] Add pytest.mark.asyncio decorator to fix async test failure (#41) - #51

Merged
Shashankss1205 merged 1 commit into
sktime:mainfrom
Abhishek9639:pytest-asyncio-dependency
Apr 4, 2026
Merged

[BUG] Add pytest.mark.asyncio decorator to fix async test failure (#41)#51
Shashankss1205 merged 1 commit into
sktime:mainfrom
Abhishek9639:pytest-asyncio-dependency

Conversation

@Abhishek9639

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #41

What does this implement/fix? Explain your changes.

The test_async_fit_predict function in tests/test_background_jobs.py is an async function but was missing the explicit @pytest.mark.asyncio decorator. Although pytest-asyncio is in our dev dependencies and asyncio_mode = "auto" is set in pyproject.toml, adding the decorator explicitly ensures pytest correctly identifies and runs the async test without solely relying on auto mode.

Changes:

  • Added import pytest.
  • Added @pytest.mark.asyncio decorator to test_async_fit_predict.

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

No. pytest-asyncio is already listed in the dev dependencies.

What should a reviewer concentrate their feedback on?

Nothing specific, just a one-line missing decorator.

Any other comments?

N/A

PR checklist

For all contributions

  • I've added myself to the list of contributors.
  • Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
  • I've added unit tests and made sure they pass locally.

For new estimators

  • I've added the estimator to the online documentation.
  • I've updated the existing example notebooks or provided a new one to showcase how my estimator works.

@Abhishek9639

Copy link
Copy Markdown
Contributor Author

Greetings @Shashankss1205,
Ready for review. Added the missing @pytest.mark.asyncio decorator to the async test.
Thanks

@Shashankss1205
Shashankss1205 merged commit f6765fc into sktime:main Apr 4, 2026
3 of 4 checks passed
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.

[BUG] test_async_fit_predict fails due to missing pytest-asyncio dependency

2 participants