##// END OF EJS Templates
Enabled Transformer
Jonathan Frederic -
Show More
@@ -1,37 +1,39 b''
1 """
1 """
2 Module with tests for the csshtmlheader transformer
2 Module with tests for the csshtmlheader transformer
3 """
3 """
4
4
5 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
6 # Copyright (c) 2013, the IPython Development Team.
6 # Copyright (c) 2013, the IPython Development Team.
7 #
7 #
8 # Distributed under the terms of the Modified BSD License.
8 # Distributed under the terms of the Modified BSD License.
9 #
9 #
10 # The full license is in the file COPYING.txt, distributed with this software.
10 # The full license is in the file COPYING.txt, distributed with this software.
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12
12
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16
16
17 from .base import TransformerTestsBase
17 from .base import TransformerTestsBase
18 from ..csshtmlheader import CSSHTMLHeaderTransformer
18 from ..csshtmlheader import CSSHTMLHeaderTransformer
19
19
20
20
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22 # Class
22 # Class
23 #-----------------------------------------------------------------------------
23 #-----------------------------------------------------------------------------
24
24
25 class TestCSSHTMLHeader(TransformerTestsBase):
25 class TestCSSHTMLHeader(TransformerTestsBase):
26 """Contains test functions for csshtmlheader.py"""
26 """Contains test functions for csshtmlheader.py"""
27
27
28 def test_constructor(self):
28 def test_constructor(self):
29 """Can a CSSHTMLHeaderTransformer be constructed?"""
29 """Can a CSSHTMLHeaderTransformer be constructed?"""
30 CSSHTMLHeaderTransformer()
30 transformer = CSSHTMLHeaderTransformer()
31 transformer.enabled = True
32 return transformer
31
33
32
34
33 def test_output(self):
35 def test_output(self):
34 """Test the output of the CSSHTMLHeaderTransformer"""
36 """Test the output of the CSSHTMLHeaderTransformer"""
35 nb, res = CSSHTMLHeaderTransformer()(self.build_notebook(), {})
37 nb, res = self.test_constructor()(self.build_notebook(), {})
36 assert 'inlining' in res
38 assert 'inlining' in res
37 assert 'css' in res['inlining'] No newline at end of file
39 assert 'css' in res['inlining']
General Comments 0
You need to be logged in to leave comments. Login now