MCPcopy Create free account
hub / github.com/ipython/traitlets / test_auto_section

Method test_auto_section

tests/config/test_loader.py:474–484  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

472 self.assertEqual("b" in c, False)
473
474 def test_auto_section(self):
475 c = Config()
476 self.assertNotIn("A", c)
477 assert not c._has_section("A")
478 A = c.A
479 A.foo = "hi there"
480 self.assertIn("A", c)
481 assert c._has_section("A")
482 self.assertEqual(c.A.foo, "hi there")
483 del c.A
484 self.assertEqual(c.A, Config())
485
486 def test_merge_doesnt_exist(self):
487 c1 = Config()

Callers

nothing calls this directly

Calls 2

_has_sectionMethod · 0.95
ConfigClass · 0.90

Tested by

no test coverage detected