Method: pylint.testutils.functional.test_file.FunctionalTestFile._parse_options
Calls: 1632, Exceptions: 1040, Paths: 3Back
Path 1: 1040 calls (0.64)
NoFileError (1040)
1def _parse_options(self) -> None:
2 cp = configparser.ConfigParser()
3 cp.add_section("testoptions")
4 try:
5 cp.read(self.option_file)
6 except NoFileError:
7 pass
8
9 for name, value in cp.items("testoptions"):
10 conv = self._CONVERTERS.get(name, lambda v: v)
11
12 assert (
13 name in POSSIBLE_TEST_OPTIONS
14 ), f"[testoptions]' can only contains one of {POSSIBLE_TEST_OPTIONS} and had '{name}'"
15 self.options[name] = conv(value) # type: ignore[literal-required]
Path 2: 297 calls (0.18)
1def _parse_options(self) -> None:
2 cp = configparser.ConfigParser()
3 cp.add_section("testoptions")
4 try:
5 cp.read(self.option_file)
6 except NoFileError:
7 pass
8
9 for name, value in cp.items("testoptions"):
10 conv = self._CONVERTERS.get(name, lambda v: v)
11
12 assert (
13 name in POSSIBLE_TEST_OPTIONS
14 ), f"[testoptions]' can only contains one of {POSSIBLE_TEST_OPTIONS} and had '{name}'"
15 self.options[name] = conv(value) # type: ignore[literal-required]
Path 3: 295 calls (0.18)
1def _parse_options(self) -> None:
2 cp = configparser.ConfigParser()
3 cp.add_section("testoptions")
4 try:
5 cp.read(self.option_file)
6 except NoFileError:
7 pass
8
9 for name, value in cp.items("testoptions"):
10 conv = self._CONVERTERS.get(name, lambda v: v)
11
12 assert (
13 name in POSSIBLE_TEST_OPTIONS
14 ), f"[testoptions]' can only contains one of {POSSIBLE_TEST_OPTIONS} and had '{name}'"
15 self.options[name] = conv(value) # type: ignore[literal-required]