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

Method test_extra_args

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

Source from the content-addressed store, hash-verified

302 self.assertEqual(u.from_string(config.d), "~/")
303
304 def test_extra_args(self):
305 cl = self.klass(log=log)
306 config = cl.load_config(["--a=5", "b", "d", "--c=10"])
307 self.assertEqual(cl.extra_args, ["b", "d"])
308 assert config.a == "5"
309 assert config.c == "10"
310 config = cl.load_config(["--", "--a=5", "--c=10"])
311 self.assertEqual(cl.extra_args, ["--a=5", "--c=10"])
312
313 cl = self.klass(log=log)
314 config = cl.load_config(["extra", "--a=2", "--c=1", "--", "-"])
315 self.assertEqual(cl.extra_args, ["extra", "-"])
316
317 def test_unicode_args(self):
318 cl = self.klass(log=log)

Callers

nothing calls this directly

Calls 1

load_configMethod · 0.45

Tested by

no test coverage detected