Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update pytest for testing extra (Fixes #1365) #1368

Merged
merged 4 commits into from
Aug 17, 2020
Merged

Update pytest for testing extra (Fixes #1365) #1368

merged 4 commits into from
Aug 17, 2020

Conversation

rbpatt2019
Copy link
Contributor

@rbpatt2019 rbpatt2019 commented Aug 15, 2020

Update pytest and plugins to most recent version for testing extra.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Update pytest to 6.0.1
    • Update pytest-sugar to 0.9.4
    • Update pytest-mock to 3.2.0 for python 3 only!

optionals

  • I have added entry in the CHANGELOG.md

@rbpatt2019
Copy link
Contributor Author

@alexcjohnson Turns it out it isn't as simple as just upgrading pytest! Several tests now fail, all related to the following error message:

/home/circleci/dash/venv/lib/python3.6/site-packages/pytest_sugar.py:214: PytestDeprecationWarning:

The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
See https://docs.pytest.org/en/stable/deprecations.html#terminalreporter-writer for more information.

pytest 6.0.0 changed the way they handle deprecations - they always call as errors now, as the affected features will be removed in 6.1.0. Seems pytest-sugar uses one of these affected features (https://docs.pytest.org/en/stable/changelog.html#id19 under Terminal Writer). I'll play with updating pytest-sugar locally, and see how that goes. If it's an issue on their end, I'll raise one there!

@rbpatt2019
Copy link
Contributor Author

That did it! The deprecation warning was fixed by updating pytest-sugar to 0.9.4. I also split pytest-mock into 2 requirements: 3.2.0 for python >= 3 and 2.0.0 for python == 2.7, which allows users to get the most up-to-date pytest -mock for their version.

@alexcjohnson
Copy link
Collaborator

Fantastic! Nice job figuring out pytest-sugar and pytest-mock. I think this does warrant a brief changelog entry since unlike a lot of dep bumps this impacts users (like yourself 😄), then we're ready to go!

@rbpatt2019 rbpatt2019 changed the title Update pytest for testing extra (#1365) Update pytest for testing extra (Fixes #1365) Aug 16, 2020
@rbpatt2019
Copy link
Contributor Author

That should do it! Let me know if there's anything else - always happy to contribute :)

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks! 💃

@alexcjohnson alexcjohnson merged commit 58eb07b into plotly:dev Aug 17, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants