mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Merge pull request #5971 from takluyver/jsonschema-test-dep
Allow tests to run without jsonschema
This commit is contained in:
commit
7623437b61
@ -147,6 +147,8 @@ have['tornado'] = test_for('tornado.version_info', (3,1,0), callback=None)
|
||||
have['jinja2'] = test_for('jinja2')
|
||||
have['requests'] = test_for('requests')
|
||||
have['sphinx'] = test_for('sphinx')
|
||||
have['jsonschema'] = test_for('jsonschema')
|
||||
have['jsonpointer'] = test_for('jsonpointer')
|
||||
have['casperjs'] = is_cmd_found('casperjs')
|
||||
have['phantomjs'] = is_cmd_found('phantomjs')
|
||||
have['slimerjs'] = is_cmd_found('slimerjs')
|
||||
@ -266,7 +268,7 @@ test_sections['qt'].requires('zmq', 'qt', 'pygments')
|
||||
|
||||
# html:
|
||||
sec = test_sections['html']
|
||||
sec.requires('zmq', 'tornado', 'requests', 'sqlite3')
|
||||
sec.requires('zmq', 'tornado', 'requests', 'sqlite3', 'jsonschema', 'jsonpointer')
|
||||
# The notebook 'static' directory contains JS, css and other
|
||||
# files for web serving. Occasionally projects may put a .py
|
||||
# file in there (MathJax ships a conf.py), so we might as
|
||||
@ -284,7 +286,7 @@ test_sections['config'].exclude('profile')
|
||||
|
||||
# nbconvert:
|
||||
sec = test_sections['nbconvert']
|
||||
sec.requires('pygments', 'jinja2')
|
||||
sec.requires('pygments', 'jinja2', 'jsonschema', 'jsonpointer')
|
||||
# Exclude nbconvert directories containing config files used to test.
|
||||
# Executing the config files with iptest would cause an exception.
|
||||
sec.exclude('tests.files')
|
||||
@ -293,6 +295,9 @@ if not have['tornado']:
|
||||
sec.exclude('nbconvert.post_processors.serve')
|
||||
sec.exclude('nbconvert.post_processors.tests.test_serve')
|
||||
|
||||
# nbformat:
|
||||
test_sections['nbformat'].requires('jsonschema', 'jsonpointer')
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Functions and classes
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -27,7 +27,7 @@ from IPython.utils.path import compress_user
|
||||
from IPython.utils.py3compat import bytes_to_str
|
||||
from IPython.utils.sysinfo import get_sys_info
|
||||
from IPython.utils.tempdir import TemporaryDirectory
|
||||
from IPython.nbconvert.filters.ansi import strip_ansi
|
||||
from IPython.utils.text import strip_ansi
|
||||
|
||||
try:
|
||||
# Python >= 3.3
|
||||
@ -217,7 +217,8 @@ def all_js_groups():
|
||||
|
||||
class JSController(TestController):
|
||||
"""Run CasperJS tests """
|
||||
requirements = ['zmq', 'tornado', 'jinja2', 'casperjs', 'sqlite3']
|
||||
requirements = ['zmq', 'tornado', 'jinja2', 'casperjs', 'sqlite3',
|
||||
'jsonschema', 'jsonpointer']
|
||||
display_slimer_output = False
|
||||
|
||||
def __init__(self, section, enabled=True, engine='phantomjs'):
|
||||
|
@ -146,7 +146,7 @@ def find_package_data():
|
||||
# (there are lots of resources we bundle for sdist-reasons that we don't actually use)
|
||||
static_data.extend([
|
||||
pjoin(components, "backbone", "backbone-min.js"),
|
||||
pjoin(components, "bootstrap", "bootstrap", "js", "bootstrap.min.js"),
|
||||
pjoin(components, "bootstrap", "js", "bootstrap.min.js"),
|
||||
pjoin(components, "bootstrap-tour", "build", "css", "bootstrap-tour.min.css"),
|
||||
pjoin(components, "bootstrap-tour", "build", "js", "bootstrap-tour.min.js"),
|
||||
pjoin(components, "font-awesome", "font", "*.*"),
|
||||
|
Loading…
Reference in New Issue
Block a user