From d5222dc74118ff7c183ee7522339e1ada6896f77 Mon Sep 17 00:00:00 2001 From: Abhay Gupta Date: Sun, 4 Nov 2018 17:02:22 +0530 Subject: [PATCH] Settings.py: Tests to increase branch coverage Modifying tests in SettingsTest.py file to increase branch coverage of ``if ext in exts:`` in get_extensions function to 100%. Closes https://github.com/coala/coala-quickstart/issues/279 --- .nocover.yaml | 3 --- setup.cfg | 1 - tests/generation/SettingsTest.py | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.nocover.yaml b/.nocover.yaml index bd157d3..a477d22 100644 --- a/.nocover.yaml +++ b/.nocover.yaml @@ -32,9 +32,6 @@ nocover_regexes: - def autofill_value - def is_autofill_possible - def require_setting - # generation/Settings.py::get_extensions - # https://github.com/coala/coala-quickstart/issues/279 - - if ext in exts # generation/SettingsClass.py::fillup_optional_settings # https://github.com/coala/coala-quickstart/issues/280 - if inside_annot diff --git a/setup.cfg b/setup.cfg index cdc8013..204b89b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -84,7 +84,6 @@ exclude_lines = def autofill_value def is_autofill_possible def require_setting - if ext in exts if inside_annot if hasattr.*generate_config def is_glob_exp diff --git a/tests/generation/SettingsTest.py b/tests/generation/SettingsTest.py index 3aec78a..77d0e62 100644 --- a/tests/generation/SettingsTest.py +++ b/tests/generation/SettingsTest.py @@ -51,7 +51,7 @@ def test_write_info(self): def test_allow_complete_section_mode_with_ignore_globs(self): project_dir = "/repo" - project_files = ['/repo/hello.html'] + project_files = ['/repo/hello.html', '/repo/readme.txt'] ignore_globs = ["/repo/style.css"] used_languages = list(get_used_languages(project_files)) relevant_bears = filter_relevant_bears(