@@ -472,9 +472,8 @@ def was_successful(self):
472
472
473
473
474
474
def check_script_prefixes ():
475
- """Check that no more than `EXPECTED_VIOLATION_COUNT` of the
475
+ """Check that at most a handful of the
476
476
test scripts don't start with one of the allowed name prefixes."""
477
- EXPECTED_VIOLATION_COUNT = 0
478
477
479
478
# LEEWAY is provided as a transition measure, so that pull-requests
480
479
# that introduce new tests that don't conform with the naming
@@ -484,13 +483,10 @@ def check_script_prefixes():
484
483
good_prefixes_re = re .compile ("(example|feature|interface|mempool|mining|p2p|rpc|wallet)_" )
485
484
bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re .match (script ) is None ]
486
485
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 )))
492
488
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 )
494
490
495
491
496
492
def check_script_list (src_dir ):
0 commit comments