diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-09 10:36:53 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-10 07:29:54 -0400 |
commit | fa3872e7b4540857261aed948b94b6b2bfdbc3d1 (patch) | |
tree | 6bbb02cb4f69fb82829752d6fbc7bad1ddbb071f /test/functional/test_framework | |
parent | fa1dce7329d3e74d46ab98b93772b1832a3f1819 (diff) |
test: Format predicate source as multiline on error
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 190301b215..0583b42388 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -216,7 +216,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)) |