##// END OF EJS Templates
handle unicode/str in pretty, str formatter...
handle unicode/str in pretty, str formatter by casting str to unicode on Python 2

File last commit:

r19813:00ef7cca
r20486:fe14d514
Show More
test_python.py
23 lines | 693 B | text/x-python | PythonLexer
MinRK
test raw cell inclusion based on raw_format metadata
r13665 """Tests for PythonExporter"""
Jonathan Frederic
Added exporter tests
r11480
Min RK
verify that the coding marker is in Python export
r19813 # Copyright (c) IPython Development Team.
Jonathan Frederic
Added exporter tests
r11480 # Distributed under the terms of the Modified BSD License.
from .base import ExportersTestsBase
from ..python import PythonExporter
Jonathan Frederic
s/Test_/Test
r11494 class TestPythonExporter(ExportersTestsBase):
MinRK
test raw cell inclusion based on raw_format metadata
r13665 """Tests for PythonExporter"""
exporter_class = PythonExporter
should_include_raw = ['python']
Jonathan Frederic
Added exporter tests
r11480
def test_constructor(self):
Min RK
verify that the coding marker is in Python export
r19813 """Can a PythonExporter be constructed?"""
self.exporter_class()
Jonathan Frederic
Added exporter tests
r11480
def test_export(self):
Min RK
verify that the coding marker is in Python export
r19813 """Can a PythonExporter export something?"""
(output, resources) = self.exporter_class().from_filename(self._get_notebook())
self.assertIn("coding: utf-8", output)