Skip to content

Register flaky pytest marker. #14353

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

Merged
merged 1 commit into from
May 30, 2019
Merged

Register flaky pytest marker. #14353

merged 1 commit into from
May 30, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 28, 2019

Otherwise, running the test suite without installing
pytest-rerunfailures now results in

_____________________________ ERROR collecting lib/matplotlib/tests/test_backend_ps.py _____________________________
lib/matplotlib/tests/test_backend_ps.py:29: in <module>
    @pytest.mark.flaky(reruns=3)
../../../.local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: in __getattr__
    PytestUnknownMarkWarning,
E   _pytest.warning_types.PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
collected 0 items / 1 errors

(The alternative is to add a hard requirement on pytest-rerunfailures to
run the test suite, but that seems overkill.)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Otherwise, running the test suite without installing
pytest-rerunfailures now results in

    _____________________________ ERROR collecting lib/matplotlib/tests/test_backend_ps.py _____________________________
    lib/matplotlib/tests/test_backend_ps.py:29: in <module>
        @pytest.mark.flaky(reruns=3)
    ../../../.local/lib/python3.7/site-packages/_pytest/mark/structures.py:324: in __getattr__
        PytestUnknownMarkWarning,
    E   _pytest.warning_types.PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    collected 0 items / 1 errors

(The alternative is to add a hard requirement on pytest-rerunfailures to
run the test suite, but that seems overkill.)
@timhoffm timhoffm merged commit 023341b into matplotlib:master May 30, 2019
@anntzer anntzer deleted the flaky branch May 30, 2019 19:24
@anntzer anntzer mentioned this pull request Jun 6, 2019
6 tasks
@QuLogic QuLogic added this to the v3.2.0 milestone Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants