mirror of
https://github.com/jupyter/notebook.git
synced 2025-04-12 14:00:27 +08:00
test for exclusions based on ipython_package_dir
This commit is contained in:
parent
cd6fd19fd8
commit
45a3230d70
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user