Pytest problem Lesson 7 #315
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hello @Cesarioo |
Beta Was this translation helpful? Give feedback.
-
So, the issue is with the GUI Ganache. I've found a few similar issues reported on the repo, as well. Until it gets fixed (or we find what we're doing wrong 😉), you can do ex = ValueError if network.show_active(
) == "ganache-local" else exceptions.VirtualMachineError
with pytest.raises(ex):
# ... Another solution is with pytest.raises(exceptions.VirtualMachineError):
lottery.enter(
{"from": get_account(), "value": lottery.getEntranceFee(), "gas_limit": 100000, "allow_revert": True}) As for the testing times, this is what I get in Lesson 7: P.S. A better title would be |
Beta Was this translation helpful? Give feedback.
So, the issue is with the GUI Ganache. I've found a few similar issues reported on the repo, as well. Until it gets fixed (or we find what we're doing wrong 😉), you can do
Another solution is
As for the testing times, this is what I get in Lesson 7:
brownie test --network development
00:05brownie test --network ganache-local
00:08Testing on an actual testnet takes much longer…