From fcaec433e5f5f3f8bd92118a186314ee5d770583 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 3 Apr 2015 17:06:04 -0700 Subject: [PATCH] use traitlets.tests.utils for help output tests for non-IPython projects --- IPython/html/tests/test_notebookapp.py | 18 +++--------------- IPython/html/tests/test_utils.py | 22 ++++++---------------- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/IPython/html/tests/test_notebookapp.py b/IPython/html/tests/test_notebookapp.py index 088a6472a..854658945 100644 --- a/IPython/html/tests/test_notebookapp.py +++ b/IPython/html/tests/test_notebookapp.py @@ -1,15 +1,5 @@ """Test NotebookApp""" -#----------------------------------------------------------------------------- -# Copyright (C) 2013 The IPython Development Team -# -# Distributed under the terms of the BSD License. The full license is in -# the file COPYING, distributed as part of this software. -#----------------------------------------------------------------------------- - -#----------------------------------------------------------------------------- -# Imports -#----------------------------------------------------------------------------- import logging import os @@ -17,19 +7,17 @@ from tempfile import NamedTemporaryFile import nose.tools as nt +from traitlets.tests.utils import check_help_all_output + from IPython.utils.tempdir import TemporaryDirectory from IPython.utils.traitlets import TraitError -import IPython.testing.tools as tt from IPython.html import notebookapp NotebookApp = notebookapp.NotebookApp -#----------------------------------------------------------------------------- -# Test functions -#----------------------------------------------------------------------------- def test_help_output(): """ipython notebook --help-all works""" - tt.help_all_output_test('notebook') + check_help_all_output('IPython.html') def test_server_info_file(): nbapp = NotebookApp(profile='nbserver_file_test', log=logging.getLogger()) diff --git a/IPython/html/tests/test_utils.py b/IPython/html/tests/test_utils.py index 0eb616646..eba3f75d0 100644 --- a/IPython/html/tests/test_utils.py +++ b/IPython/html/tests/test_utils.py @@ -1,31 +1,21 @@ """Test HTML utils""" -#----------------------------------------------------------------------------- -# Copyright (C) 2013 The IPython Development Team -# -# Distributed under the terms of the BSD License. The full license is in -# the file COPYING, distributed as part of this software. -#----------------------------------------------------------------------------- - -#----------------------------------------------------------------------------- -# Imports -#----------------------------------------------------------------------------- +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. import os import nose.tools as nt -import IPython.testing.tools as tt +from traitlets.tests.utils import check_help_all_output from IPython.html.utils import url_escape, url_unescape, is_hidden from IPython.utils.tempdir import TemporaryDirectory -#----------------------------------------------------------------------------- -# Test functions -#----------------------------------------------------------------------------- def test_help_output(): - """ipython notebook --help-all works""" - tt.help_all_output_test('notebook') + """jupyter notebook --help-all works""" + # FIXME: will be jupyter_notebook + check_help_all_output('IPython.html') def test_url_escape():