Skip to content

Commit

Permalink
test for exclusions based on ipython_package_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed May 31, 2012
1 parent 10a5333 commit b4ea219
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions IPython/testing/iptest.py
Expand Up @@ -48,7 +48,7 @@

# 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b4ea219

Please sign in to comment.