##// END OF EJS Templates
Backport PR #4934: `ipython profile create` respects `--ipython-dir`...
Thomas Kluyver -
Show More
@@ -280,8 +280,8 b' class ProfileCreate(BaseIPythonApplication):'
280 280 app.log = self.log
281 281 app.overwrite = self.overwrite
282 282 app.copy_config_files=True
283 app.profile = self.profile
284 app.init_profile_dir()
283 app.ipython_dir=self.ipython_dir
284 app.profile_dir=self.profile_dir
285 285 app.init_config_files()
286 286
287 287 def stage_default_config_file(self):
@@ -36,7 +36,8 b' from IPython.core.profiledir import ProfileDir'
36 36 from IPython.testing import decorators as dec
37 37 from IPython.testing import tools as tt
38 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 43 # Globals
@@ -151,3 +152,15 b' def test_list_bundled_profiles():'
151 152 bundled_true = [u'cluster', u'math', u'pysh', u'sympy']
152 153 bundled = sorted(list_bundled_profiles())
153 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