You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tests are currently run using an environment in which all packages are installed, including optional ones such as aiohttp. This could lead to some tests passing while they shouldn't. For example, see #1377 .
We should run the tests that don't require any optional dependencies in an environment in which they are not installed, and tests that do require optional dependencies, should be run separately.
I originally proposed pytest.mark instead of pytest.skip since skipping tests is silent. If we don't install the optional dependencies correctly in the test environment, the tests will just be skipped instead of failing.
You can mark complete modules as well, don't know if that solves the ImortError issue?
Final option is to ignore specific paths via command line arguments. This is probably the easiest approach if we only need to ignore the aiohttp directory, but is not really suited for more complex setups.
This PR delays import errors for the optional Flask dependency, so you
can use the AsyncApp without Flask installed.
This issue is hidden in our tests since we install all extras. To
prevent this, we need to address
#1389.
The tests are currently run using an environment in which all packages are installed, including optional ones such as
aiohttp
. This could lead to some tests passing while they shouldn't. For example, see #1377 .We should run the tests that don't require any optional dependencies in an environment in which they are not installed, and tests that do require optional dependencies, should be run separately.
Some ways of achieving this:
pytest.skip
andpytest.skipif
: https://docs.pytest.org/en/stable/skipping.html#skipifpytest.mark
: https://docs.pytest.org/en/6.2.x/example/markers.htmlImportError
s during test collectionThe text was updated successfully, but these errors were encountered: