Skip to content

Commit 6f881cc

Browse files
committed
[tests] Remove EXPECTED_VIOLATION_COUNT
1 parent 3150b3f commit 6f881cc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/functional/test_runner.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ def was_successful(self):
472472

473473

474474
def check_script_prefixes():
475-
"""Check that no more than `EXPECTED_VIOLATION_COUNT` of the
475+
"""Check that at most a handful of the
476476
test scripts don't start with one of the allowed name prefixes."""
477-
EXPECTED_VIOLATION_COUNT = 0
478477

479478
# LEEWAY is provided as a transition measure, so that pull-requests
480479
# that introduce new tests that don't conform with the naming
@@ -484,13 +483,10 @@ def check_script_prefixes():
484483
good_prefixes_re = re.compile("(example|feature|interface|mempool|mining|p2p|rpc|wallet)_")
485484
bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None]
486485

487-
if len(bad_script_names) < EXPECTED_VIOLATION_COUNT:
488-
print("{}HURRAY!{} Number of functional tests violating naming convention reduced!".format(BOLD[1], BOLD[0]))
489-
print("Consider reducing EXPECTED_VIOLATION_COUNT from %d to %d" % (EXPECTED_VIOLATION_COUNT, len(bad_script_names)))
490-
elif len(bad_script_names) > EXPECTED_VIOLATION_COUNT:
491-
print("INFO: %d tests not meeting naming conventions (expected %d):" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT))
486+
if len(bad_script_names) > 0:
487+
print("INFO: %d tests not meeting naming conventions:" % (len(bad_script_names)))
492488
print(" %s" % ("\n ".join(sorted(bad_script_names))))
493-
assert len(bad_script_names) <= EXPECTED_VIOLATION_COUNT + LEEWAY, "Too many tests not following naming convention! (%d found, expected: <= %d)" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT)
489+
assert len(bad_script_names) <= LEEWAY, "Too many tests not following naming convention! (%d found, maximum: %d)" % (len(bad_script_names), LEEWAY)
494490

495491

496492
def check_script_list(src_dir):

0 commit comments

Comments
 (0)