test_python.py
23 lines
| 693 B
| text/x-python
|
PythonLexer
MinRK
|
r13665 | """Tests for PythonExporter""" | ||
Jonathan Frederic
|
r11480 | |||
Min RK
|
r19813 | # Copyright (c) IPython Development Team. | ||
Jonathan Frederic
|
r11480 | # Distributed under the terms of the Modified BSD License. | ||
from .base import ExportersTestsBase | ||||
from ..python import PythonExporter | ||||
Jonathan Frederic
|
r11494 | class TestPythonExporter(ExportersTestsBase): | ||
MinRK
|
r13665 | """Tests for PythonExporter""" | ||
exporter_class = PythonExporter | ||||
should_include_raw = ['python'] | ||||
Jonathan Frederic
|
r11480 | |||
def test_constructor(self): | ||||
Min RK
|
r19813 | """Can a PythonExporter be constructed?""" | ||
self.exporter_class() | ||||
Jonathan Frederic
|
r11480 | |||
def test_export(self): | ||||
Min RK
|
r19813 | """Can a PythonExporter export something?""" | ||
(output, resources) = self.exporter_class().from_filename(self._get_notebook()) | ||||
self.assertIn("coding: utf-8", output) | ||||