mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-19 03:20:37 +00:00
[tests] Make comp test framework more debuggable
Add logging so that each test prints the line number of the yield statement that generated the test.
This commit is contained in:
parent
17f2acedbe
commit
7481579131
@ -295,8 +295,11 @@ class TestManager(object):
|
|||||||
# Wait until verack is received
|
# Wait until verack is received
|
||||||
self.wait_for_verack()
|
self.wait_for_verack()
|
||||||
|
|
||||||
test_number = 1
|
test_number = 0
|
||||||
for test_instance in self.test_generator.get_tests():
|
tests = self.test_generator.get_tests()
|
||||||
|
for test_instance in tests:
|
||||||
|
test_number += 1
|
||||||
|
logger.info("Running test %d: %s line %s" % (test_number, tests.gi_code.co_filename, tests.gi_frame.f_lineno))
|
||||||
# We use these variables to keep track of the last block
|
# We use these variables to keep track of the last block
|
||||||
# and last transaction in the tests, which are used
|
# and last transaction in the tests, which are used
|
||||||
# if we're not syncing on every block or every tx.
|
# if we're not syncing on every block or every tx.
|
||||||
@ -397,9 +400,6 @@ class TestManager(object):
|
|||||||
if (not self.check_mempool(tx.sha256, tx_outcome)):
|
if (not self.check_mempool(tx.sha256, tx_outcome)):
|
||||||
raise AssertionError("Mempool test failed at test %d" % test_number)
|
raise AssertionError("Mempool test failed at test %d" % test_number)
|
||||||
|
|
||||||
logger.info("Test %d: PASS" % test_number)
|
|
||||||
test_number += 1
|
|
||||||
|
|
||||||
[ c.disconnect_node() for c in self.connections ]
|
[ c.disconnect_node() for c in self.connections ]
|
||||||
self.wait_for_disconnections()
|
self.wait_for_disconnections()
|
||||||
self.block_store.close()
|
self.block_store.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user