()
| 55 | |
| 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", 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" |
nothing calls this directly
no test coverage detected
searching dependent graphs…