##// END OF EJS Templates
`ipython profile create` respects `--ipython-dir`...
MinRK -
Show More
@@ -285,8 +285,8 b' class ProfileCreate(BaseIPythonApplication):'
285 app.log = self.log
285 app.log = self.log
286 app.overwrite = self.overwrite
286 app.overwrite = self.overwrite
287 app.copy_config_files=True
287 app.copy_config_files=True
288 app.profile = self.profile
288 app.ipython_dir=self.ipython_dir
289 app.init_profile_dir()
289 app.profile_dir=self.profile_dir
290 app.init_config_files()
290 app.init_config_files()
291
291
292 def stage_default_config_file(self):
292 def stage_default_config_file(self):
@@ -36,7 +36,8 b' from IPython.core.profiledir import ProfileDir'
36 from IPython.testing import decorators as dec
36 from IPython.testing import decorators as dec
37 from IPython.testing import tools as tt
37 from IPython.testing import tools as tt
38 from IPython.utils import py3compat
38 from IPython.utils import py3compat
39
39 from IPython.utils.process import getoutput
40 from IPython.utils.tempdir import TemporaryDirectory
40
41
41 #-----------------------------------------------------------------------------
42 #-----------------------------------------------------------------------------
42 # Globals
43 # Globals
@@ -151,3 +152,15 b' def test_list_bundled_profiles():'
151 bundled_true = [u'cluster', u'math', u'pysh', u'sympy']
152 bundled_true = [u'cluster', u'math', u'pysh', u'sympy']
152 bundled = sorted(list_bundled_profiles())
153 bundled = sorted(list_bundled_profiles())
153 nt.assert_equal(bundled, bundled_true)
154 nt.assert_equal(bundled, bundled_true)
155
156
157 def test_profile_create_ipython_dir():
158 """ipython profile create respects --ipython-dir"""
159 with TemporaryDirectory() as td:
160 getoutput([sys.executable, '-m', 'IPython', 'profile', 'create',
161 'foo', '--ipython-dir=%s' % td])
162 profile_dir = os.path.join(td, 'profile_foo')
163 assert os.path.exists(profile_dir)
164 ipython_config = os.path.join(profile_dir, 'ipython_config.py')
165 assert os.path.exists(ipython_config)
166 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now