Run pytest with --asyncio-mode=auto#328
Closed
dkaplan1 wants to merge 1 commit into
Closed
Conversation
|
@deathowl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
5 tasks
facebook-github-bot
pushed a commit
that referenced
this pull request
Apr 14, 2022
…d. (#332) Summary: **What:** CI tests are currently [failing](https://github.com/facebook/TestSlide/actions/runs/2158772378) for Python3.6 with the error: ``` ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] __main__.py: error: unrecognized arguments: --asyncio-mode=auto inifile: None ``` **Why:** CI/unit tests are failing for Python3.6. I believe this failure was introduced with [this](#328) change and [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) seems to be 3.7+ compatible. **How:** Do not run pytest with `--asyncio-mode=auto` for Python3.6 **Risks:** None identified. **Checklist**: - [ ] Added tests, if you've added code that should be tested (N/A) - [ ] Updated the documentation, if you've changed APIs( N/A) - [X] Ensured the test suite passes - [X] Made sure your code lints - [X] Completed the Contributor License Agreement ("CLA") Pull Request resolved: #332 Reviewed By: cjcon90 Differential Revision: D35643124 Pulled By: deathowl fbshipit-source-id: 62ed607d51abacce45e37654181907c6a8310501
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Updated call to
runpytestto use--asyncio-mode=auto.Why:
Pytest tests are currently failing due to the deprecation warning added to pytest-asyncio in pytest-dev/pytest-asyncio@0a143c4 causing the assertion
TestSlide/pytest-testslide/tests/test_pytest_testslide.py
Line 129 in 55f12e6
23 passed, 1 warning, 4 errors in x.xxs.Based on https://github.com/pytest-dev/pytest-asyncio#modes I think auto is the correct mode, please let me know if it should be something else.
How:
Adding
--asyncio-mode=autoto the pytest run.Risks:
None that I can think of.
Checklist: