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

Method test_basic

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

Source from the content-addressed store, hash-verified

281 assert c.list_trait == ["hello", 5]
282
283 def test_basic(self):
284 cl = self.klass(log=log)
285 argv = ["--" + s[2:] for s in pyfile.split("\n") if s.startswith("c.")]
286 config = cl.load_config(argv)
287 assert config.a == "10"
288 assert config.b == "20"
289 assert config.Foo.Bar.value == "10"
290 # non-literal expressions are not evaluated
291 self.assertEqual(config.Foo.Bam.value, "list(range(10))")
292 self.assertEqual(Unicode().from_string(config.D.C.value), "hi there")
293
294 def test_expanduser(self):
295 cl = self.klass(log=log)

Callers

nothing calls this directly

Calls 3

UnicodeClass · 0.90
load_configMethod · 0.45
from_stringMethod · 0.45

Tested by

no test coverage detected