From 896394955ac0f081afeaba733a3e82fe7839e3e0 Mon Sep 17 00:00:00 2001 From: Mani Sarkar Date: Mon, 13 Mar 2023 04:20:01 +0000 Subject: [PATCH] Test coverage: fixed the coverage issue in ease of reading check to get coverage back to 100 --- nlp_profiler/high_level_features/ease_of_reading_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nlp_profiler/high_level_features/ease_of_reading_check.py b/nlp_profiler/high_level_features/ease_of_reading_check.py index 77cd7b6..2c77381 100644 --- a/nlp_profiler/high_level_features/ease_of_reading_check.py +++ b/nlp_profiler/high_level_features/ease_of_reading_check.py @@ -70,8 +70,8 @@ def ease_of_reading(score: int) -> str: return NOT_APPLICABLE score = float(score) - for each_slab in ease_of_reading_to_words_mapping: - # pragma: no cover => early termination leads to loss of test coverage info + # early termination leads to loss of test coverage info hence use of pragma: no cover + for each_slab in ease_of_reading_to_words_mapping: # pragma: no cover if ((score <= 0) and (each_slab[1] == 0)) or ((score >= 100) and (each_slab[2] == 100)): return each_slab[0] elif (score >= each_slab[1]) and (score <= each_slab[2]):