Merge pull request #2032 from fjarri/assert-fix

Check the actual boolean values instead of asserting a non-empty tuple
pull/2034/head
K Prasch 2020-05-22 12:37:48 -07:00 committed by GitHub
commit 705b44577e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -225,7 +225,7 @@ def test_flags(testerchain, token, escrow_contract):
# Check flag defaults
wind_down, re_stake, measure_work, snapshots = escrow.functions.getFlags(staker).call()
assert (not wind_down, re_stake, not measure_work, snapshots)
assert all((not wind_down, re_stake, not measure_work, snapshots))
# There should be no events so far
assert 0 == len(wind_down_log.get_all_entries())
@ -240,7 +240,7 @@ def test_flags(testerchain, token, escrow_contract):
testerchain.wait_for_receipt(tx)
wind_down, re_stake, measure_work, snapshots = escrow.functions.getFlags(staker).call()
assert (not wind_down, re_stake, not measure_work, snapshots)
assert all((not wind_down, re_stake, not measure_work, snapshots))
# There should be no events so far
assert 0 == len(wind_down_log.get_all_entries())
@ -253,7 +253,7 @@ def test_flags(testerchain, token, escrow_contract):
testerchain.wait_for_receipt(tx)
wind_down, re_stake, measure_work, snapshots = escrow.functions.getFlags(staker).call()
assert (not wind_down, not re_stake, not measure_work, snapshots)
assert all((not wind_down, not re_stake, not measure_work, snapshots))
assert 0 == len(wind_down_log.get_all_entries())
assert 1 == len(restake_log.get_all_entries())
@ -269,7 +269,7 @@ def test_flags(testerchain, token, escrow_contract):
testerchain.wait_for_receipt(tx)
wind_down, re_stake, measure_work, snapshots = escrow.functions.getFlags(staker).call()
assert (not wind_down, not re_stake, not measure_work, not snapshots)
assert all((not wind_down, not re_stake, not measure_work, not snapshots))
assert 0 == len(wind_down_log.get_all_entries())
assert 1 == len(restake_log.get_all_entries())