##// END OF EJS Templates
use traitlets.tests.utils for help output tests...
Min RK -
Show More
@@ -1,15 +1,5 b''
1 """Test NotebookApp"""
1 """Test NotebookApp"""
2
2
3 #-----------------------------------------------------------------------------
4 # Copyright (C) 2013 The IPython Development Team
5 #
6 # Distributed under the terms of the BSD License. The full license is in
7 # the file COPYING, distributed as part of this software.
8 #-----------------------------------------------------------------------------
9
10 #-----------------------------------------------------------------------------
11 # Imports
12 #-----------------------------------------------------------------------------
13
3
14 import logging
4 import logging
15 import os
5 import os
@@ -17,19 +7,17 b' from tempfile import NamedTemporaryFile'
17
7
18 import nose.tools as nt
8 import nose.tools as nt
19
9
10 from traitlets.tests.utils import check_help_all_output
11
20 from IPython.utils.tempdir import TemporaryDirectory
12 from IPython.utils.tempdir import TemporaryDirectory
21 from IPython.utils.traitlets import TraitError
13 from IPython.utils.traitlets import TraitError
22 import IPython.testing.tools as tt
23 from IPython.html import notebookapp
14 from IPython.html import notebookapp
24 NotebookApp = notebookapp.NotebookApp
15 NotebookApp = notebookapp.NotebookApp
25
16
26 #-----------------------------------------------------------------------------
27 # Test functions
28 #-----------------------------------------------------------------------------
29
17
30 def test_help_output():
18 def test_help_output():
31 """ipython notebook --help-all works"""
19 """ipython notebook --help-all works"""
32 tt.help_all_output_test('notebook')
20 check_help_all_output('IPython.html')
33
21
34 def test_server_info_file():
22 def test_server_info_file():
35 nbapp = NotebookApp(profile='nbserver_file_test', log=logging.getLogger())
23 nbapp = NotebookApp(profile='nbserver_file_test', log=logging.getLogger())
@@ -1,31 +1,21 b''
1 """Test HTML utils"""
1 """Test HTML utils"""
2
2
3 #-----------------------------------------------------------------------------
3 # Copyright (c) Jupyter Development Team.
4 # Copyright (C) 2013 The IPython Development Team
4 # Distributed under the terms of the Modified BSD License.
5 #
6 # Distributed under the terms of the BSD License. The full license is in
7 # the file COPYING, distributed as part of this software.
8 #-----------------------------------------------------------------------------
9
10 #-----------------------------------------------------------------------------
11 # Imports
12 #-----------------------------------------------------------------------------
13
5
14 import os
6 import os
15
7
16 import nose.tools as nt
8 import nose.tools as nt
17
9
18 import IPython.testing.tools as tt
10 from traitlets.tests.utils import check_help_all_output
19 from IPython.html.utils import url_escape, url_unescape, is_hidden
11 from IPython.html.utils import url_escape, url_unescape, is_hidden
20 from IPython.utils.tempdir import TemporaryDirectory
12 from IPython.utils.tempdir import TemporaryDirectory
21
13
22 #-----------------------------------------------------------------------------
23 # Test functions
24 #-----------------------------------------------------------------------------
25
14
26 def test_help_output():
15 def test_help_output():
27 """ipython notebook --help-all works"""
16 """jupyter notebook --help-all works"""
28 tt.help_all_output_test('notebook')
17 # FIXME: will be jupyter_notebook
18 check_help_all_output('IPython.html')
29
19
30
20
31 def test_url_escape():
21 def test_url_escape():
@@ -1,28 +1,15 b''
1 """Tests for two-process terminal frontend
1 """Tests for two-process terminal frontend"""
2
2
3 Currently only has the most simple test possible, starting a console and running
3 # Copyright (c) Jupyter Development Team.
4 a single command.
4 # Distributed under the terms of the Modified BSD License.
5
6 Authors:
7
8 * Min RK
9 """
10
11 #-----------------------------------------------------------------------------
12 # Imports
13 #-----------------------------------------------------------------------------
14
5
15 import sys
6 import sys
16
7
17 from nose import SkipTest
8 from nose import SkipTest
18
9
19 import IPython.testing.tools as tt
10 from traitlets.tests.utils import check_help_all_output
20 from IPython.testing import decorators as dec
11 from IPython.testing import decorators as dec
21
12
22 #-----------------------------------------------------------------------------
23 # Tests
24 #-----------------------------------------------------------------------------
25
26 @dec.skip_win32
13 @dec.skip_win32
27 def test_console_starts():
14 def test_console_starts():
28 """test that `ipython console` starts a terminal"""
15 """test that `ipython console` starts a terminal"""
@@ -34,8 +21,7 b' def test_console_starts():'
34
21
35 def test_help_output():
22 def test_help_output():
36 """ipython console --help-all works"""
23 """ipython console --help-all works"""
37 tt.help_all_output_test('console')
24 check_help_all_output('jupyter_console')
38
39
25
40 def test_display_text():
26 def test_display_text():
41 "Ensure display protocol plain/text key is supported"
27 "Ensure display protocol plain/text key is supported"
@@ -11,7 +11,7 b' import sys'
11 from .base import TestsBase
11 from .base import TestsBase
12 from ..postprocessors import PostProcessorBase
12 from ..postprocessors import PostProcessorBase
13
13
14 import IPython.testing.tools as tt
14 from traitlets.tests.utils import check_help_all_output
15 from IPython.testing import decorators as dec
15 from IPython.testing import decorators as dec
16
16
17 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
@@ -34,7 +34,7 b' class TestNbConvertApp(TestsBase):'
34
34
35 def test_help_output(self):
35 def test_help_output(self):
36 """ipython nbconvert --help-all works"""
36 """ipython nbconvert --help-all works"""
37 tt.help_all_output_test('nbconvert')
37 check_help_all_output('jupyter_nbconvert')
38
38
39 def test_glob(self):
39 def test_glob(self):
40 """
40 """
@@ -1,27 +1,15 b''
1 """Test QtConsoleApp"""
1 """Test QtConsoleApp"""
2
2
3 #-----------------------------------------------------------------------------
3 # Copyright (c) Jupyter Development Team.
4 # Copyright (C) 2013 The IPython Development Team
4 # Distributed under the terms of the Modified BSD License.
5 #
6 # Distributed under the terms of the BSD License. The full license is in
7 # the file COPYING, distributed as part of this software.
8 #-----------------------------------------------------------------------------
9
10 #-----------------------------------------------------------------------------
11 # Imports
12 #-----------------------------------------------------------------------------
13
5
14 import nose.tools as nt
6 import nose.tools as nt
15
7
16 import IPython.testing.tools as tt
8 from traitlets.tests.utils import check_help_all_output
17 from IPython.testing.decorators import skip_if_no_x11
9 from IPython.testing.decorators import skip_if_no_x11
18
10
19 #-----------------------------------------------------------------------------
20 # Test functions
21 #-----------------------------------------------------------------------------
22
23 @skip_if_no_x11
11 @skip_if_no_x11
24 def test_help_output():
12 def test_help_output():
25 """ipython qtconsole --help-all works"""
13 """jupyter qtconsole --help-all works"""
26 tt.help_all_output_test('qtconsole')
14 check_help_all_output('jupyter_qtconsole')
27
15
General Comments 0
You need to be logged in to leave comments. Login now