def test_auto_section(self): c = Config() self.assertNotIn('A', c) assert not c._has_section('A') A = c.A A.foo = 'hi there' self.assertIn('A', c) assert c._has_section('A') self.assertEqual(c.A.foo, 'hi there') del c.A self.assertEqual(c.A, Config())
def test_auto_section(self): c = Config() self.assertNotIn("A", c) assert not c._has_section("A") A = c.A A.foo = "hi there" self.assertIn("A", c) assert c._has_section("A") self.assertEqual(c.A.foo, "hi there") del c.A self.assertEqual(c.A, Config())