diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-01-12 12:49:06 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-01-12 12:49:10 +0100 |
| commit | 7cb024eba68b1db0d803c6c3d41e1e3a22fe2457 (patch) | |
| tree | 0d954ada0a4d1a3e84069819e8f30e7fd6347cf1 /qa/rpc-tests/test_framework/util.py | |
| parent | Merge #9468: [Depends] Dependency updates for 0.14.0 (diff) | |
| parent | Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (diff) | |
| download | archived-discoin-7cb024eba68b1db0d803c6c3d41e1e3a22fe2457.tar.xz archived-discoin-7cb024eba68b1db0d803c6c3d41e1e3a22fe2457.zip | |
Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
Diffstat (limited to 'qa/rpc-tests/test_framework/util.py')
| -rw-r--r-- | qa/rpc-tests/test_framework/util.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index c29033595..aca82c8b6 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -524,14 +524,18 @@ def assert_fee_amount(fee, tx_size, fee_per_kB): if fee > (tx_size + 2) * fee_per_kB / 1000: raise AssertionError("Fee of %s BTC too high! (Should be %s BTC)"%(str(fee), str(target_fee))) -def assert_equal(thing1, thing2): - if thing1 != thing2: - raise AssertionError("%s != %s"%(str(thing1),str(thing2))) +def assert_equal(thing1, thing2, *args): + if thing1 != thing2 or any(thing1 != arg for arg in args): + raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) def assert_greater_than(thing1, thing2): if thing1 <= thing2: raise AssertionError("%s <= %s"%(str(thing1),str(thing2))) +def assert_greater_than_or_equal(thing1, thing2): + if thing1 < thing2: + raise AssertionError("%s < %s"%(str(thing1),str(thing2))) + def assert_raises(exc, fun, *args, **kwds): assert_raises_message(exc, None, fun, *args, **kwds) |