-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add Test Environment that runs tests w/out aiohttp #17718
Conversation
{envbindir}/python -m pip freeze | ||
pytest \ | ||
{[testenv]default_pytest_params} \ | ||
--ignore-glob='*_async.py' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the try:
import aiohttp
raise Exception("aiohttp was not successfully installed")
except ImportError:
pass |
I see what you're going after here. I'll add something like it. |
…r if we can import from any of them
@seankane-msft added! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean imports Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
/azp run python - core - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
@seankane-msft
This is related to this issue.
Can you poke holes in my logic? We don't really have anything to key off to identify one of these "optional" requirements that may or may not be present. So it's not really a case of extending
create_package_and_install.py
to identify additional requirements.To solve this generically without messing with anyone's day-to-day development, I created a new tox environment
whl_no_aio
. This is essentially a retread ofwhl
(aka the default) tox environment. The only difference is that have an error-ignored line (notice the leading-
) that attempts uninstall of aiohttp prior to invoking any of the install or test commands.