From b4ea21987022078b29de77f72322438e11dc5afc 2012-05-31 19:17:51 From: MinRK Date: 2012-05-31 19:17:51 Subject: [PATCH] test for exclusions based on ipython_package_dir --- diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index b3080ad..5df454d 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -48,7 +48,7 @@ from nose.core import TestProgram # Our own imports from IPython.utils.importstring import import_item -from IPython.utils.path import get_ipython_module_path +from IPython.utils.path import get_ipython_module_path, get_ipython_package_dir from IPython.utils.process import find_cmd, pycmd2argv from IPython.utils.sysinfo import sys_info from IPython.utils.warn import warn @@ -280,8 +280,10 @@ def make_exclude(): exclusions = [s.replace('\\','\\\\') for s in exclusions] # check for any exclusions that don't seem to exist: + parent, _ = os.path.split(get_ipython_package_dir()) for exclusion in exclusions: - if not os.path.exists(exclusion) and not os.path.exists(exclusion + '.py'): + fullpath = pjoin(parent, exclusion) + if not os.path.exists(fullpath) and not os.path.exists(fullpath + '.py'): warn("Excluding nonexistent file: %r\n" % exclusion) return exclusions