aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/plugins/twisted_trial.py
blob: 3e64a09e8307f1b8f3ce1bb8f1fe77c90c069f9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
from zope.interface import implementer

from twisted.plugin import IPlugin
from twisted.trial.itrial import IReporter


@implementer(IPlugin, IReporter)
class _Reporter:
    def __init__(self, name, module, description, longOpt, shortOpt, klass):
        self.name = name
        self.module = module
        self.description = description
        self.longOpt = longOpt
        self.shortOpt = shortOpt
        self.klass = klass

    @property
    def stream(self):
        # IReporter.stream
        pass

    @property
    def tbformat(self):
        # IReporter.tbformat
        pass

    @property
    def args(self):
        # IReporter.args
        pass

    @property
    def shouldStop(self):
        # IReporter.shouldStop
        pass

    @property
    def separator(self):
        # IReporter.separator
        pass

    @property
    def testsRun(self):
        # IReporter.testsRun
        pass

    def addError(self, test, error):
        # IReporter.addError
        pass

    def addExpectedFailure(self, test, failure, todo=None):
        # IReporter.addExpectedFailure
        pass

    def addFailure(self, test, failure):
        # IReporter.addFailure
        pass

    def addSkip(self, test, reason):
        # IReporter.addSkip
        pass

    def addSuccess(self, test):
        # IReporter.addSuccess
        pass

    def addUnexpectedSuccess(self, test, todo=None):
        # IReporter.addUnexpectedSuccess
        pass

    def cleanupErrors(self, errs):
        # IReporter.cleanupErrors
        pass

    def done(self):
        # IReporter.done
        pass

    def endSuite(self, name):
        # IReporter.endSuite
        pass

    def printErrors(self):
        # IReporter.printErrors
        pass

    def printSummary(self):
        # IReporter.printSummary
        pass

    def startSuite(self, name):
        # IReporter.startSuite
        pass

    def startTest(self, method):
        # IReporter.startTest
        pass

    def stopTest(self, method):
        # IReporter.stopTest
        pass

    def upDownError(self, userMeth, warn=True, printStatus=True):
        # IReporter.upDownError
        pass

    def wasSuccessful(self):
        # IReporter.wasSuccessful
        pass

    def write(self, string):
        # IReporter.write
        pass

    def writeln(self, string):
        # IReporter.writeln
        pass


Tree = _Reporter(
    "Tree Reporter",
    "twisted.trial.reporter",
    description="verbose color output (default reporter)",
    longOpt="verbose",
    shortOpt="v",
    klass="TreeReporter",
)

BlackAndWhite = _Reporter(
    "Black-And-White Reporter",
    "twisted.trial.reporter",
    description="Colorless verbose output",
    longOpt="bwverbose",
    shortOpt="o",
    klass="VerboseTextReporter",
)

Minimal = _Reporter(
    "Minimal Reporter",
    "twisted.trial.reporter",
    description="minimal summary output",
    longOpt="summary",
    shortOpt="s",
    klass="MinimalReporter",
)

Classic = _Reporter(
    "Classic Reporter",
    "twisted.trial.reporter",
    description="terse text output",
    longOpt="text",
    shortOpt="t",
    klass="TextReporter",
)

Timing = _Reporter(
    "Timing Reporter",
    "twisted.trial.reporter",
    description="Timing output",
    longOpt="timing",
    shortOpt=None,
    klass="TimingTextReporter",
)

Subunit = _Reporter(
    "Subunit Reporter",
    "twisted.trial.reporter",
    description="subunit output",
    longOpt="subunit",
    shortOpt=None,
    klass="SubunitReporter",
)