Show More
@@ -1,3 +1,4 b'' | |||||
|
1 | # coding: utf-8 | |||
1 | """Tests for IPython.core.application""" |
|
2 | """Tests for IPython.core.application""" | |
2 |
|
3 | |||
3 | import os |
|
4 | import os | |
@@ -7,7 +8,7 b' from IPython.core.application import Application' | |||||
7 |
|
8 | |||
8 | def test_unicode_cwd(): |
|
9 | def test_unicode_cwd(): | |
9 | """Check that IPython starts with non-ascii characters in the path.""" |
|
10 | """Check that IPython starts with non-ascii characters in the path.""" | |
10 | wd = tempfile.mkdtemp(suffix="€") |
|
11 | wd = tempfile.mkdtemp(suffix=u"€") | |
11 |
|
12 | |||
12 | old_wd = os.getcwdu() |
|
13 | old_wd = os.getcwdu() | |
13 | os.chdir(wd) |
|
14 | os.chdir(wd) | |
@@ -34,7 +35,7 b' def test_unicode_cwd():' | |||||
34 |
|
35 | |||
35 | def test_unicode_ipdir(): |
|
36 | def test_unicode_ipdir(): | |
36 | """Check that IPython starts with non-ascii characters in the IP dir.""" |
|
37 | """Check that IPython starts with non-ascii characters in the IP dir.""" | |
37 | ipdir = tempfile.mkdtemp(suffix="€") |
|
38 | ipdir = tempfile.mkdtemp(suffix=u"€") | |
38 |
|
39 | |||
39 | # Create the config file, so it tries to load it. |
|
40 | # Create the config file, so it tries to load it. | |
40 | with open(os.path.join(ipdir, 'ipython_config.py'), "w") as f: |
|
41 | with open(os.path.join(ipdir, 'ipython_config.py'), "w") as f: | |
@@ -42,7 +43,7 b' def test_unicode_ipdir():' | |||||
42 |
|
43 | |||
43 | old_ipdir1 = os.environ.pop("IPYTHONDIR", None) |
|
44 | old_ipdir1 = os.environ.pop("IPYTHONDIR", None) | |
44 | old_ipdir2 = os.environ.pop("IPYTHON_DIR", None) |
|
45 | old_ipdir2 = os.environ.pop("IPYTHON_DIR", None) | |
45 | os.environ["IPYTHONDIR"] = ipdir |
|
46 | os.environ["IPYTHONDIR"] = ipdir.encode("utf-8") | |
46 | try: |
|
47 | try: | |
47 | app = Application() |
|
48 | app = Application() | |
48 | # The lines below are copied from Application.initialize() |
|
49 | # The lines below are copied from Application.initialize() |
General Comments 0
You need to be logged in to leave comments.
Login now