unittest.py 978 B

1234567891011121314151617181920212223242526272829303132333435
  1. # -*- test-case-name: twisted.trial.test -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. Things likely to be used by writers of unit tests.
  6. """
  7. from __future__ import division, absolute_import
  8. # Define the public API from the two implementation modules
  9. from twisted.trial._synctest import (
  10. FailTest, SkipTest, SynchronousTestCase, PyUnitResultAdapter, Todo,
  11. makeTodo)
  12. from twisted.trial._asynctest import TestCase
  13. from twisted.trial._asyncrunner import (
  14. TestSuite, TestDecorator, decorate)
  15. # Further obscure the origins of these objects, to reduce surprise (and this is
  16. # what the values were before code got shuffled around between files, but was
  17. # otherwise unchanged).
  18. FailTest.__module__ = SkipTest.__module__ = __name__
  19. __all__ = [
  20. 'decorate',
  21. 'FailTest',
  22. 'makeTodo',
  23. 'PyUnitResultAdapter',
  24. 'SkipTest',
  25. 'SynchronousTestCase',
  26. 'TestCase',
  27. 'TestDecorator',
  28. 'TestSuite',
  29. 'Todo',
  30. ]