pytest-asyncio icon indicating copy to clipboard operation
pytest-asyncio copied to clipboard

Fix duplication of markers in async tests

Open seifertm opened this issue 1 year ago • 1 comments

Fixes #813

seifertm avatar May 19 '24 12:05 seifertm

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.08%. Comparing base (65aa441) to head (d15c9fc). Report is 314 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
- Coverage   95.61%   92.08%   -3.54%     
==========================================
  Files           2        2              
  Lines         479      480       +1     
  Branches       96       96              
==========================================
- Hits          458      442      -16     
- Misses         12       23      +11     
- Partials        9       15       +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Jul 04 '24 08:07 codecov-commenter

Thank you for a quick fix! Alas, it didn't fix the bokeh testsuite (at least in my environment).

MeggyCal avatar Jul 09 '24 14:07 MeggyCal

@MeggyCal Can you provide a small code example that reproduces the issue? Ideally, this should go into a separate issue.

seifertm avatar Jul 10 '24 05:07 seifertm

Sorry, not easily, I can try next week. Anyway, it is visible in my project on the openSUSE Buildservice: https://build.opensuse.org/project/show/home:mcalabkova:branches:devel:languages:python:numeric

MeggyCal avatar Jul 16 '24 09:07 MeggyCal

@MeggyCal A quick look at the logs suggest that the tests due to the following warning:

pytest.PytestWarning: The test […] is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.

The warning is most likely unrelated to this PR and probably not a bug either, because the warning exists for some time already.

Whether the warning is reasonable or not is an entirely different issue. I'm open for discussing this in a dedicated issue or discussion :)

seifertm avatar Jul 16 '24 10:07 seifertm

@seifertm I took a look in the bokeh issues and found out it is a known issue since December: https://github.com/bokeh/bokeh/issues/13578. So it is merely a consequence of openSUSE not upper-bounding dependencies and there's no need to open another issue.

Sorry for the false alarm, I just looked into this repo first and since I saw a fix for a similar-sounding issue, I didn't investigate further and just assumed wrong. Thank you very much for your help!

MeggyCal avatar Jul 17 '24 17:07 MeggyCal

Thanks for the investigation, @MeggyCal ! I hope that we can get rid of the blockers soon, which prevent users from upgrading from v0.21…

seifertm avatar Jul 17 '24 17:07 seifertm