Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
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.

twisted_trial.py 3.4KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. from zope.interface import implementer
  2. from twisted.plugin import IPlugin
  3. from twisted.trial.itrial import IReporter
  4. @implementer(IPlugin, IReporter)
  5. class _Reporter:
  6. def __init__(self, name, module, description, longOpt, shortOpt, klass):
  7. self.name = name
  8. self.module = module
  9. self.description = description
  10. self.longOpt = longOpt
  11. self.shortOpt = shortOpt
  12. self.klass = klass
  13. @property
  14. def stream(self):
  15. # IReporter.stream
  16. pass
  17. @property
  18. def tbformat(self):
  19. # IReporter.tbformat
  20. pass
  21. @property
  22. def args(self):
  23. # IReporter.args
  24. pass
  25. @property
  26. def shouldStop(self):
  27. # IReporter.shouldStop
  28. pass
  29. @property
  30. def separator(self):
  31. # IReporter.separator
  32. pass
  33. @property
  34. def testsRun(self):
  35. # IReporter.testsRun
  36. pass
  37. def addError(self, test, error):
  38. # IReporter.addError
  39. pass
  40. def addExpectedFailure(self, test, failure, todo=None):
  41. # IReporter.addExpectedFailure
  42. pass
  43. def addFailure(self, test, failure):
  44. # IReporter.addFailure
  45. pass
  46. def addSkip(self, test, reason):
  47. # IReporter.addSkip
  48. pass
  49. def addSuccess(self, test):
  50. # IReporter.addSuccess
  51. pass
  52. def addUnexpectedSuccess(self, test, todo=None):
  53. # IReporter.addUnexpectedSuccess
  54. pass
  55. def cleanupErrors(self, errs):
  56. # IReporter.cleanupErrors
  57. pass
  58. def done(self):
  59. # IReporter.done
  60. pass
  61. def endSuite(self, name):
  62. # IReporter.endSuite
  63. pass
  64. def printErrors(self):
  65. # IReporter.printErrors
  66. pass
  67. def printSummary(self):
  68. # IReporter.printSummary
  69. pass
  70. def startSuite(self, name):
  71. # IReporter.startSuite
  72. pass
  73. def startTest(self, method):
  74. # IReporter.startTest
  75. pass
  76. def stopTest(self, method):
  77. # IReporter.stopTest
  78. pass
  79. def upDownError(self, userMeth, warn=True, printStatus=True):
  80. # IReporter.upDownError
  81. pass
  82. def wasSuccessful(self):
  83. # IReporter.wasSuccessful
  84. pass
  85. def write(self, string):
  86. # IReporter.write
  87. pass
  88. def writeln(self, string):
  89. # IReporter.writeln
  90. pass
  91. Tree = _Reporter(
  92. "Tree Reporter",
  93. "twisted.trial.reporter",
  94. description="verbose color output (default reporter)",
  95. longOpt="verbose",
  96. shortOpt="v",
  97. klass="TreeReporter",
  98. )
  99. BlackAndWhite = _Reporter(
  100. "Black-And-White Reporter",
  101. "twisted.trial.reporter",
  102. description="Colorless verbose output",
  103. longOpt="bwverbose",
  104. shortOpt="o",
  105. klass="VerboseTextReporter",
  106. )
  107. Minimal = _Reporter(
  108. "Minimal Reporter",
  109. "twisted.trial.reporter",
  110. description="minimal summary output",
  111. longOpt="summary",
  112. shortOpt="s",
  113. klass="MinimalReporter",
  114. )
  115. Classic = _Reporter(
  116. "Classic Reporter",
  117. "twisted.trial.reporter",
  118. description="terse text output",
  119. longOpt="text",
  120. shortOpt="t",
  121. klass="TextReporter",
  122. )
  123. Timing = _Reporter(
  124. "Timing Reporter",
  125. "twisted.trial.reporter",
  126. description="Timing output",
  127. longOpt="timing",
  128. shortOpt=None,
  129. klass="TimingTextReporter",
  130. )
  131. Subunit = _Reporter(
  132. "Subunit Reporter",
  133. "twisted.trial.reporter",
  134. description="subunit output",
  135. longOpt="subunit",
  136. shortOpt=None,
  137. klass="SubunitReporter",
  138. )