From b03ae0a5f3aeaec8cef97e812fc19f9607211185 2010-01-13 08:32:13 From: Fernando Perez Date: 2010-01-13 08:32:13 Subject: [PATCH] Fix bug where python -c "import IPython; IPython.test()" could fail. Depending on where one was located when typing it, it could fail. Made all necessary paths absolute so this doesn't happen. --- diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 258573d..fd2cb31 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -199,8 +199,8 @@ class IPTester(object): # Script not installed (may be the case for testing situations # that are running from a source tree only), pull from internal # path: - iptest_path = pjoin(genutils.get_ipython_package_dir(), - 'scripts','iptest') + pak_dir = os.path.abspath(genutils.get_ipython_package_dir()) + iptest_path = pjoin(pak_dir, 'scripts', 'iptest') self.runner = tools.cmd2argv(iptest_path) + ['-v'] else: self.runner = tools.cmd2argv(os.path.abspath(find_cmd('trial')))