diff options
author | Chris Moore <dooglus@gmail.com> | 2016-12-13 13:36:23 -0800 |
---|---|---|
committer | Chris Moore <dooglus@gmail.com> | 2016-12-13 13:36:23 -0800 |
commit | 453bda63dd90986501ee61426e4d768a400bd371 (patch) | |
tree | 0edbbef75f7072b1d3ee1389e0a5715bd93cd4b5 /qa/rpc-tests/test_framework/util.py | |
parent | 26fe5c98ab6a0bcf253467d70ef0d910fedac518 (diff) |
Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'.
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 85898d9f32..57f8218cf0 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) |