Example #1
0
 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())
Example #2
0
 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())
Example #3
0
 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())
Example #4
0
 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())