Check that IPython starts with non-ascii characters in the IP dir.
()
| 31 | |
| 32 | @dec.onlyif_unicode_paths |
| 33 | def test_unicode_ipdir(): |
| 34 | """Check that IPython starts with non-ascii characters in the IP dir.""" |
| 35 | ipdir = tempfile.mkdtemp(suffix="€") |
| 36 | |
| 37 | # Create the config file, so it tries to load it. |
| 38 | with open(os.path.join(ipdir, "ipython_config.py"), "w", encoding="utf-8") as f: |
| 39 | pass |
| 40 | |
| 41 | old_ipdir1 = os.environ.pop("IPYTHONDIR", None) |
| 42 | old_ipdir2 = os.environ.pop("IPYTHON_DIR", None) |
| 43 | os.environ["IPYTHONDIR"] = ipdir |
| 44 | try: |
| 45 | app = BaseIPythonApplication() |
| 46 | # The lines below are copied from Application.initialize() |
| 47 | app.init_profile_dir() |
| 48 | app.init_config_files() |
| 49 | app.load_config_file(suppress_errors=False) |
| 50 | finally: |
| 51 | if old_ipdir1: |
| 52 | os.environ["IPYTHONDIR"] = old_ipdir1 |
| 53 | if old_ipdir2: |
| 54 | os.environ["IPYTHONDIR"] = old_ipdir2 |
| 55 | |
| 56 | |
| 57 | def test_cli_priority(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…