Skip to content

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
Collaborator

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