From 198a11535b5065416c41e7fdc025718c1a92eff3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 25 Feb 2021 20:32:34 -0500 Subject: test: add a test of missing sections and options --- coverage/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/config.py') diff --git a/coverage/config.py b/coverage/config.py index 026f8645..7ef7e7ae 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -63,7 +63,7 @@ class HandyConfigParser(configparser.RawConfigParser): real_section = section_prefix + section if configparser.RawConfigParser.has_section(self, real_section): return configparser.RawConfigParser.options(self, real_section) - raise configparser.NoSectionError + raise configparser.NoSectionError(section) def get_section(self, section): """Get the contents of a section, as a dictionary.""" @@ -87,7 +87,7 @@ class HandyConfigParser(configparser.RawConfigParser): if configparser.RawConfigParser.has_option(self, real_section, option): break else: - raise configparser.NoOptionError + raise configparser.NoOptionError(option, section) v = configparser.RawConfigParser.get(self, real_section, option, *args, **kwargs) v = substitute_variables(v, os.environ) -- cgit v1.2.1