##// END OF EJS Templates
verify that the coding marker is in Python export
Min RK -
Show More
@@ -1,23 +1,11 b''
1 """Tests for PythonExporter"""
1 """Tests for PythonExporter"""
2
2
3 #-----------------------------------------------------------------------------
3 # Copyright (c) IPython Development Team.
4 # Copyright (c) 2013, the IPython Development Team.
5 #
6 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
7 #
8 # The full license is in the file COPYING.txt, distributed with this software.
9 #-----------------------------------------------------------------------------
10
11 #-----------------------------------------------------------------------------
12 # Imports
13 #-----------------------------------------------------------------------------
14
5
15 from .base import ExportersTestsBase
6 from .base import ExportersTestsBase
16 from ..python import PythonExporter
7 from ..python import PythonExporter
17
8
18 #-----------------------------------------------------------------------------
19 # Class
20 #-----------------------------------------------------------------------------
21
9
22 class TestPythonExporter(ExportersTestsBase):
10 class TestPythonExporter(ExportersTestsBase):
23 """Tests for PythonExporter"""
11 """Tests for PythonExporter"""
@@ -26,15 +14,10 b' class TestPythonExporter(ExportersTestsBase):'
26 should_include_raw = ['python']
14 should_include_raw = ['python']
27
15
28 def test_constructor(self):
16 def test_constructor(self):
29 """
17 """Can a PythonExporter be constructed?"""
30 Can a PythonExporter be constructed?
18 self.exporter_class()
31 """
32 PythonExporter()
33
34
19
35 def test_export(self):
20 def test_export(self):
36 """
21 """Can a PythonExporter export something?"""
37 Can a PythonExporter export something?
22 (output, resources) = self.exporter_class().from_filename(self._get_notebook())
38 """
23 self.assertIn("coding: utf-8", output)
39 (output, resources) = PythonExporter().from_filename(self._get_notebook())
40 assert len(output) > 0 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now