From d7f1c23f4d175fb93ed0539db5bade4a08b7ecac Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Sat, 15 Aug 2020 23:32:13 -0600 Subject: [PATCH] tests: show found number of features when unexpected --- tests/fixtures.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/fixtures.py b/tests/fixtures.py index 21ee429d..50a766d8 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -376,7 +376,12 @@ def do_test_feature_presence(get_extractor, sample, scope, feature, expected): def do_test_feature_count(get_extractor, sample, scope, feature, expected): extractor = get_extractor(sample) features = scope(extractor) - msg = "%s should be found %d times in %s" % (str(feature), expected, scope.__name__) + msg = "%s should be found %d times in %s, found: %d" % ( + str(feature), + expected, + scope.__name__, + len(features[feature]), + ) assert len(features[feature]) == expected, msg