MCPcopy Create free account
hub / github.com/ipython/ipython / test_cli_priority

Function test_cli_priority

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

Source from the content-addressed store, hash-verified

55 os.environ["IPYTHONDIR"] = old_ipdir2
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") as f:
65 f.write("c.TestApp.test = 'config file'")
66
67 app = TestApp()
68 app.initialize(['--profile-dir', td])
69 nt.assert_equal(app.test, 'config file')
70 app = TestApp()
71 app.initialize(['--profile-dir', td, '--TestApp.test=cli'])
72 nt.assert_equal(app.test, 'cli')
73

Callers

nothing calls this directly

Calls 3

TestAppClass · 0.85
writeMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected