Show More
@@ -27,8 +27,6 b' import tempfile' | |||
|
27 | 27 | from pathlib import Path |
|
28 | 28 | from unittest import TestCase |
|
29 | 29 | |
|
30 | import nose.tools as nt | |
|
31 | ||
|
32 | 30 | from IPython.core.profileapp import list_profiles_in, list_bundled_profiles |
|
33 | 31 | from IPython.core.profiledir import ProfileDir |
|
34 | 32 | |
@@ -79,7 +77,7 b' def win32_without_pywin32():' | |||
|
79 | 77 | except ImportError: |
|
80 | 78 | return True |
|
81 | 79 | return False |
|
82 | ||
|
80 | ||
|
83 | 81 | |
|
84 | 82 | class ProfileStartupTest(TestCase): |
|
85 | 83 | def setUp(self): |
@@ -114,7 +112,7 b' class ProfileStartupTest(TestCase):' | |||
|
114 | 112 | self.init('00-start.ipy', '%xmode plain\n', '') |
|
115 | 113 | self.validate('Exception reporting mode: Plain') |
|
116 | 114 | |
|
117 | ||
|
115 | ||
|
118 | 116 | def test_list_profiles_in(): |
|
119 | 117 | # No need to remove these directories and files, as they will get nuked in |
|
120 | 118 | # the module-level teardown. |
@@ -127,7 +125,7 b' def test_list_profiles_in():' | |||
|
127 | 125 | with open(td / "profile_file", "w") as f: |
|
128 | 126 | f.write("I am not a profile directory") |
|
129 | 127 | profiles = list_profiles_in(td) |
|
130 | ||
|
128 | ||
|
131 | 129 | # unicode normalization can turn u'ünicode' into u'u\0308nicode', |
|
132 | 130 | # so only check for *nicode, and that creating a ProfileDir from the |
|
133 | 131 | # name remains valid |
@@ -139,14 +137,14 b' def test_list_profiles_in():' | |||
|
139 | 137 | found_unicode = True |
|
140 | 138 | break |
|
141 | 139 | if dec.unicode_paths: |
|
142 |
|
|
|
143 |
|
|
|
140 | assert found_unicode is True | |
|
141 | assert set(profiles) == {"foo", "hello"} | |
|
144 | 142 | |
|
145 | 143 | |
|
146 | 144 | def test_list_bundled_profiles(): |
|
147 | 145 | # This variable will need to be updated when a new profile gets bundled |
|
148 | 146 | bundled = sorted(list_bundled_profiles()) |
|
149 |
|
|
|
147 | assert bundled == [] | |
|
150 | 148 | |
|
151 | 149 | |
|
152 | 150 | def test_profile_create_ipython_dir(): |
@@ -167,4 +165,3 b' def test_profile_create_ipython_dir():' | |||
|
167 | 165 | assert Path(profile_dir).exists() |
|
168 | 166 | ipython_config = profile_dir / "ipython_config.py" |
|
169 | 167 | assert Path(ipython_config).exists() |
|
170 |
General Comments 0
You need to be logged in to leave comments.
Login now