Skip to content

fix dist test by moving --no-pkgroot to runtests.py #9129

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
Oct 5, 2023

Conversation

terencehonles
Copy link
Contributor

Description

This change fixes the dist test by moving the --no-pkgroot option from pytest to the runtests script.

The current "filterwarnings" setting for pytest includes rest_framework, which causes an early import of the module. As a result the current --no-pkgroot behavior fails with an assertion error. Trying to remove the module from sys.modules will cause the warning filter to not apply, so this change moves this code before pytest parses the config and loads the "filterwarnings".

This change fixes the dist test by moving the --no-pkgroot option from
pytest to the runtests script.

The current "filterwarnings" setting for pytest includes rest_framework,
which causes an early import of the module. As a result the current
--no-pkgroot behavior fails with an assertion error. Trying to remove
the module from sys.modules will cause the warning filter to not apply,
so this change moves this code before pytest parses the config and loads
the "filterwarnings".
@auvipy auvipy added this to the 3.15 milestone Oct 5, 2023
@auvipy auvipy merged commit 4296189 into encode:master Oct 5, 2023
@auvipy
Copy link
Member

auvipy commented Oct 5, 2023

thanks!

@terencehonles terencehonles deleted the fix-dist-test branch October 5, 2023 08:49
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.

2 participants