test_serve.py 670 B

123456789101112131415161718192021222324
  1. """
  2. Module with tests for the serve post-processor
  3. """
  4. # Copyright (c) Jupyter Development Team.
  5. # Distributed under the terms of the Modified BSD License.
  6. import pytest
  7. from ...tests.base import TestsBase
  8. class TestServe(TestsBase):
  9. """Contains test functions for serve.py"""
  10. def test_constructor(self):
  11. """Can a ServePostProcessor be constructed?"""
  12. pytest.importorskip("tornado")
  13. try:
  14. from ..serve import ServePostProcessor
  15. except ImportError:
  16. print("Something weird is happening.\n"
  17. "Tornado is sometimes present, sometimes not.")
  18. raise
  19. ServePostProcessor()