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
When running tests, the different tests should run in isolation, including the tests function with @pytest.fixture params. With the latest version of ape, the blockchain isn't reverted to the snapshot between several tests using the different values provided by @pytest.fixture params.
pandadefi
changed the title
Test function isolation isn't working when using @pytest.fixture(params=[X, Y, Z])
Test function isolation isn't working when using fixture with parameters
Feb 6, 2023
We discovered that parametrized fixtures are not always working correctly, especially in complex setups. However we found that if you change the parametrization to be on the test using pytest.mark.paramtrize(), things work as expected. We are going to look into the issue with parametrized fixture and isolation! Thank you for reporting.
Environment information
ape
and plugin versions: 0.6.2What went wrong?
When running tests, the different tests should run in isolation, including the tests function with @pytest.fixture params. With the latest version of ape, the blockchain isn't reverted to the snapshot between several tests using the different values provided by @pytest.fixture params.
here is an example: https://github.com/yearn/veYFI/pull/220/files#diff-dd59d96f9ab6202cc08431b4f984bd2f6934b6d6bf9c37e8697ee68ad4f6058eR220
Here the first test will pass with no tokens looked in the contract, but this assertion will fail on the second run with the second parameter.
Previous version
I have downgraded to ape version 0.5.9. The issue is the same.
The text was updated successfully, but these errors were encountered: