fubuloubu / pytest-ethereum-old

py.test plugin for testing Ethereum smart contracts
MIT License
20 stars 1 forks source link

Fix "t.now()" function to be correct #6

Closed fubuloubu closed 6 years ago

fubuloubu commented 6 years ago

I tried integrating a function that would return the current timestamp for comparisons to stored time in contract testing. It should return basically what the latest unmined block time is (does this match the system clock?). I am currently trying to do it this way here: https://github.com/fubuloubu/pytest-ethereum/blob/da7f9f19c10b6bb6bd50a3fc75836672efeccf3f/pytest_ethereum/tester.py#L54-L56

Unsure if this is the correct approach.

fubuloubu commented 6 years ago

Updated latest to pending, functionality seems to work correctly!