diff options
| author | MarcoFalke <[email protected]> | 2019-05-09 10:36:53 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-05-16 16:15:49 -0400 |
| commit | 8f215c7a270066b315060a112fe69d968ab8b292 (patch) | |
| tree | 83e825f1a531058ac79125b142969346f8bcef40 /test/functional/test_framework | |
| parent | net: Rename ::fRelayTxes to ::g_relay_txes (diff) | |
| download | discoin-8f215c7a270066b315060a112fe69d968ab8b292.tar.xz discoin-8f215c7a270066b315060a112fe69d968ab8b292.zip | |
test: Format predicate source as multiline on error
Github-Pull: #15990
Rebased-From: fa3872e7b4540857261aed948b94b6b2bfdbc3d1
Diffstat (limited to 'test/functional/test_framework')
| -rw-r--r-- | test/functional/test_framework/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index fef998241..87e2dbaf1 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -219,7 +219,7 @@ def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf'), lock=N time.sleep(0.05) # Print the cause of the timeout - predicate_source = inspect.getsourcelines(predicate) + predicate_source = "''''\n" + inspect.getsource(predicate) + "'''" logger.error("wait_until() failed. Predicate: {}".format(predicate_source)) if attempt >= attempts: raise AssertionError("Predicate {} not true after {} attempts".format(predicate_source, attempts)) |