Open andytudhope opened 5 years ago
Uniswap has a good view of how to setup a good pytest test suite: https://github.com/Uniswap/contracts-vyper/tree/master/tests
@andytudhope Is someone working on this?
If not, I'd like to take this on ;).
Yeah, let's maybe just hold off here until next week. Hopefully we've solved the curve mathematics by then and can test properly....
Working off this commit: https://github.com/andytudhope/Recollections/commit/68c32cee57d104d4924a793c593bd38ab84cac22
Add any and all test cases you can think of. We need to test everything in this contract as thoroughly as possible: whether the
rate
,available
,votes_minted
andeffective_balance
are what we expect at all times, whether SNT goes to the correct place (either the contract for upvotes or the developer for downvotes), whether the ceiling functions as intended, whether all the asserts work as intended and so on.@jacqueswww has recommended https://hypothesis.works
The main reasons for testing in python and not javascript, to put it bluntly, are: