##// END OF EJS Templates
Small tweaks to unicode in test file.
Thomas Kluyver -
Show More
@@ -1,3 +1,4 b''
1 # coding: utf-8
1 2 """Tests for IPython.core.application"""
2 3
3 4 import os
@@ -7,7 +8,7 b' from IPython.core.application import Application'
7 8
8 9 def test_unicode_cwd():
9 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 13 old_wd = os.getcwdu()
13 14 os.chdir(wd)
@@ -34,7 +35,7 b' def test_unicode_cwd():'
34 35
35 36 def test_unicode_ipdir():
36 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 40 # Create the config file, so it tries to load it.
40 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 44 old_ipdir1 = os.environ.pop("IPYTHONDIR", None)
44 45 old_ipdir2 = os.environ.pop("IPYTHON_DIR", None)
45 os.environ["IPYTHONDIR"] = ipdir
46 os.environ["IPYTHONDIR"] = ipdir.encode("utf-8")
46 47 try:
47 48 app = Application()
48 49 # The lines below are copied from Application.initialize()
General Comments 0
You need to be logged in to leave comments. Login now