You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/nbconvert/exporters/tests/test_python.py

25 lines
748 B

"""Tests for PythonExporter"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from .base import ExportersTestsBase
from ..python import PythonExporter
class TestPythonExporter(ExportersTestsBase):
"""Tests for PythonExporter"""
exporter_class = PythonExporter
should_include_raw = ['python']
def test_constructor(self):
"""Can a PythonExporter be constructed?"""
self.exporter_class()
def test_export(self):
"""Can a PythonExporter export something?"""
(output, resources) = self.exporter_class().from_filename(self._get_notebook())
self.assertIn("coding: utf-8", output)
self.assertIn("#!/usr/bin/env python", output)