diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/feature_uacomment.py | 2 | ||||
-rwxr-xr-x | test/functional/test_framework/mininode.py | 2 | ||||
-rwxr-xr-x | test/functional/test_runner.py | 14 |
3 files changed, 6 insertions, 12 deletions
diff --git a/test/functional/feature_uacomment.py b/test/functional/feature_uacomment.py index 0b2c64ab69..bc3791508a 100755 --- a/test/functional/feature_uacomment.py +++ b/test/functional/feature_uacomment.py @@ -23,7 +23,7 @@ class UacommentTest(BitcoinTestFramework): self.log.info("test -uacomment max length") self.stop_node(0) - expected = "Total length of network version string (286) exceeds maximum length (256). Reduce the number or size of uacomments." + expected = "exceeds maximum length (256). Reduce the number or size of uacomments." self.assert_start_raises_init_error(0, ["-uacomment=" + 'a' * 256], expected) self.log.info("test -uacomment unsafe characters") diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index fe14591139..4d9661de37 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -6,7 +6,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin P2P network half-a-node. -This python code was modified from ArtForz' public domain half-a-node, as +This python code was modified from ArtForz' public domain half-a-node, as found in the mini-node branch of http://github.com/jgarzik/pynode. P2PConnection: A low-level connection object to a node's P2P interface diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 98944685e1..c670878d68 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -472,21 +472,15 @@ class TestResult(): def check_script_prefixes(): - """Check that at most a handful of the - test scripts don't start with one of the allowed name prefixes.""" - - # LEEWAY is provided as a transition measure, so that pull-requests - # that introduce new tests that don't conform with the naming - # convention don't immediately cause the tests to fail. - LEEWAY = 10 + """Check that test scripts start with one of the allowed name prefixes.""" good_prefixes_re = re.compile("(example|feature|interface|mempool|mining|p2p|rpc|wallet)_") bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None] - if len(bad_script_names) > 0: - print("INFO: %d tests not meeting naming conventions:" % (len(bad_script_names))) + if bad_script_names: + print("%sERROR:%s %d tests not meeting naming conventions:" % (BOLD[1], BOLD[0], len(bad_script_names))) print(" %s" % ("\n ".join(sorted(bad_script_names)))) - assert len(bad_script_names) <= LEEWAY, "Too many tests not following naming convention! (%d found, maximum: %d)" % (len(bad_script_names), LEEWAY) + raise AssertionError("Some tests are not following naming convention!") def check_script_list(src_dir): |