()
| 55 | os.environ["IPYTHONDIR"] = old_ipdir2 |
| 56 | |
| 57 | def 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 |
nothing calls this directly
no test coverage detected