MCPcopy Index your code
hub / github.com/ipython/ipython / test_cli_priority

Function test_cli_priority

tests/test_application.py:57–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def test_cli_priority():
58 with TemporaryDirectory() as td:
59
60 class TestApp(BaseIPythonApplication):
61 test = Unicode().tag(config=True)
62
63 # Create the config file, so it tries to load it.
64 with open(os.path.join(td, "ipython_config.py"), "w", encoding="utf-8") as f:
65 f.write("c.TestApp.test = 'config file'")
66
67 app = TestApp()
68 app.initialize(["--profile-dir", td])
69 assert app.test == "config file"
70 app = TestApp()
71 app.initialize(["--profile-dir", td, "--TestApp.test=cli"])
72 assert app.test == "cli"

Callers

nothing calls this directly

Calls 3

TestAppClass · 0.85
writeMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…