MCPcopy Index your code
hub / github.com/python/cpython / test_missing_options

Method test_missing_options

Lib/test/test_configparser.py:1942–1950  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1940 self.assertIs(cm.exception.__suppress_context__, True)
1941
1942 def test_missing_options(self):
1943 parser = configparser.ConfigParser()
1944 parser.read_string("""
1945 [Paths]
1946 home_dir: /Users
1947 """)
1948 with self.assertRaises(configparser.NoSectionError) as cm:
1949 parser.options('test')
1950 self.assertIs(cm.exception.__suppress_context__, True)
1951
1952 def test_missing_section(self):
1953 config = configparser.ConfigParser()

Callers

nothing calls this directly

Calls 4

read_stringMethod · 0.80
assertRaisesMethod · 0.45
optionsMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected