options.py 737 B

12345678910111213141516171819202122232425262728
  1. # -*- test-case-name: twisted.trial._dist.test.test_options -*-
  2. #
  3. # Copyright (c) Twisted Matrix Laboratories.
  4. # See LICENSE for details.
  5. """
  6. Options handling specific to trial's workers.
  7. @since: 12.3
  8. """
  9. from twisted.application.app import ReactorSelectionMixin
  10. from twisted.python.filepath import FilePath
  11. from twisted.python.usage import Options
  12. from twisted.scripts.trial import _BasicOptions
  13. class WorkerOptions(_BasicOptions, Options, ReactorSelectionMixin):
  14. """
  15. Options forwarded to the trial distributed worker.
  16. """
  17. def coverdir(self):
  18. """
  19. Return a L{FilePath} representing the directory into which coverage
  20. results should be written.
  21. """
  22. return FilePath("coverage")