mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
[qa] test_framework: Properly print exceptions and assert empty dict
This commit is contained in:
parent
5555528b47
commit
fada064f67
2 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ class BitcoinTestFramework(object):
|
||||||
print("key not found: "+ str(e))
|
print("key not found: "+ str(e))
|
||||||
traceback.print_tb(sys.exc_info()[2])
|
traceback.print_tb(sys.exc_info()[2])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Unexpected exception caught during testing: "+str(e))
|
print("Unexpected exception caught during testing: " + repr(e))
|
||||||
traceback.print_tb(sys.exc_info()[2])
|
traceback.print_tb(sys.exc_info()[2])
|
||||||
|
|
||||||
if not self.options.noshutdown:
|
if not self.options.noshutdown:
|
||||||
|
|
|
@ -487,7 +487,7 @@ def assert_array_result(object_array, to_match, expected, should_not_find = Fals
|
||||||
in object_array
|
in object_array
|
||||||
"""
|
"""
|
||||||
if should_not_find == True:
|
if should_not_find == True:
|
||||||
expected = { }
|
assert_equal(expected, { })
|
||||||
num_matched = 0
|
num_matched = 0
|
||||||
for item in object_array:
|
for item in object_array:
|
||||||
all_match = True
|
all_match = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue