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

Method test_basic

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

Source from the content-addressed store, hash-verified

209
210class TestArgParseCL(TestCase):
211 def test_basic(self):
212 cl = MyLoader1()
213 config = cl.load_config("-f hi -b 10 -n wow".split())
214 self.assertEqual(config.Global.foo, "hi")
215 self.assertEqual(config.MyClass.bar, 10)
216 self.assertEqual(config.n, True)
217 self.assertEqual(config.Global.bam, "wow")
218 config = cl.load_config(["wow"])
219 self.assertEqual(list(config.keys()), ["Global"])
220 self.assertEqual(list(config.Global.keys()), ["bam"])
221 self.assertEqual(config.Global.bam, "wow")
222
223 def test_add_arguments(self):
224 cl = MyLoader2()

Callers

nothing calls this directly

Calls 2

MyLoader1Class · 0.85
load_configMethod · 0.45

Tested by

no test coverage detected