Open OwlOfMoistness opened 1 year ago
Hello!
I am guessing the fixture is indeed session-isolation (both via pytest and chain-isolation) but the tests themselves are still "function" scoped so they get the function isolation (including chain-restore) regardless.
I think what we could do is add a skip_isolation
fixture or a @skip_isolation
decorator to skip isolation for individual tests. Thoughts on that?
Note, we do have the --skip-isolation
flag that will ignore all chain-isolation in your tests. Pytest-fixtures would still work normally but the chain would not do any snapshotting.
Environment information
ape
and plugin versions:ape-config.yaml
(NOTE: do not post anything private like RPC urls or secrets!):What went wrong?
When setting the scope of items in conftest, it seems like scoping does not work
Here is the conftest:
And here is the test that shows scoping doesnt not work
platform linux -- Python 3.9.2, pytest-7.4.0, pluggy-1.2.0 -- /home/owl/.local/pipx/venvs/eth-ape/bin/python cachedir: .pytest_cache rootdir: /home/owl/apeworx_plygrd plugins: eth-ape-0.6.13, web3-6.6.1 collected 2 items
tests/test_test.py::test_1 0 1 PASSED tests/test_test.py::test_2 0 1 PASSED
tests/test_test.py::test_1 0 1 PASSED tests/test_test.py::test_2 1 2 PASSED```
How can it be fixed?
Unsure sadly, most likely in the ape_test directory, area that loads sends info to pytest?