test_markdown.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """Tests for MarkdownExporter"""
  2. #-----------------------------------------------------------------------------
  3. # Copyright (c) 2013, the IPython Development Team.
  4. #
  5. # Distributed under the terms of the Modified BSD License.
  6. #
  7. # The full license is in the file COPYING.txt, distributed with this software.
  8. #-----------------------------------------------------------------------------
  9. #-----------------------------------------------------------------------------
  10. # Imports
  11. #-----------------------------------------------------------------------------
  12. from .base import ExportersTestsBase
  13. from ..markdown import MarkdownExporter
  14. #-----------------------------------------------------------------------------
  15. # Class
  16. #-----------------------------------------------------------------------------
  17. class TestMarkdownExporter(ExportersTestsBase):
  18. """Tests for MarkdownExporter"""
  19. exporter_class = MarkdownExporter
  20. should_include_raw = ['markdown', 'html']
  21. def test_constructor(self):
  22. """
  23. Can a MarkdownExporter be constructed?
  24. """
  25. MarkdownExporter()
  26. def test_export(self):
  27. """
  28. Can a MarkdownExporter export something?
  29. """
  30. (output, resources) = MarkdownExporter().from_filename(self._get_notebook())
  31. assert len(output) > 0