This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
test_try_parser.py
340 lines (284 loc) · 19.5 KB
/
test_try_parser.py
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
from buildbotcustom.try_parser import TryParser, processMessage
import unittest
###### TEST CASES #####
BUILDER_PRETTY_NAMES = {'macosx64':'OS X 10.6.2 try build', 'win32':'WINNT 5.2 try build', 'win32-debug':'WINNT 5.2 try leak test build', 'linux64':'Linux x86-64 try build', 'linux':'Linux try build', 'macosx64-debug':'OS X 10.6.2 try leak test build', 'linux64-debug':'Linux x86-64 try leak test build', 'linux-debug':'Linux try leak test build', 'macosx-debug':'OS X 10.5.2 try leak test build', 'android-r7':'Android R7 try build', 'maemo5-gtk':'Maemo 5 GTK try build'}
# TODO -- need to check on how to separate out the two win32 prettynames
TESTER_PRETTY_NAMES = {'macosx':['Rev3 MacOSX Leopard 10.5.8'], 'macosx64':['Rev3 MacOSX Snow Leopard 10.6.2', 'Rev3 MacOSX Leopard 10.5.8'], 'win32':['Rev3 WINNT 5.1', 'Rev3 WINNT 6.1'], 'linux-64':['Rev3 Fedora 12x64'], 'linux':['Rev3 Fedora 12']}
TESTER_PRETTY_TB_NAMES = {'linux':['TB Rev3 Fedora 12']}
UNITTEST_PRETTY_NAMES = {'win32-debug':'WINNT 5.2 try debug test'}
TALOS_SUITES = ['tp4', 'chrome']
UNITTEST_SUITES = ['reftest', 'crashtest', 'mochitests-1/5', 'mochitests-3/5', 'mochitest-other']
UNITTEST_SUITES_TB = ['xpcshell', 'mozmill']
MOBILE_UNITTEST_SUITES = ['reftest-1/3', 'reftest-3/3'] + UNITTEST_SUITES[1:]
VALID_UPN = ['WINNT 5.2 try debug test mochitests-1/5', 'WINNT 5.2 try debug test mochitests-3/5', 'WINNT 5.2 try debug test mochitest-other', 'WINNT 5.2 try debug test reftest', 'WINNT 5.2 try debug test crashtest']
VALID_REFTEST_NAMES = ['WINNT 5.2 try debug test reftest', 'WINNT 5.2 try debug test reftest-1/3', 'WINNT 5.2 try debug test reftest-3/3']
VALID_BUILDER_NAMES = ['OS X 10.6.2 try build', 'WINNT 5.2 try build', 'Linux x86-64 try build', 'Linux try build', 'OS X 10.5.2 try leak test build', 'OS X 10.6.2 try leak test build', 'WINNT 5.2 try leak test build', 'Linux x86-64 try leak test build', 'Linux try leak test build','Android R7 try build', 'Maemo 5 GTK try build']
VALID_TESTER_NAMES = ['Rev3 Fedora 12 try opt test mochitests-1/5', 'Rev3 Fedora 12 try opt test mochitest-other', 'Rev3 Fedora 12 try opt test crashtest', 'Rev3 Fedora 12 try debug test mochitests-1/5', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 5.1 try opt test reftest', 'Rev3 WINNT 6.1 try opt test crashtest', 'Rev3 WINNT 6.1 try debug test crashtest', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 try talos tp4', 'Rev3 WINNT 5.1 try talos chrome', 'Rev3 WINNT 6.1 try talos tp4', 'Rev3 WINNT 5.1 try talos tp4', 'Rev3 WINNT 6.1 try talos chrome']
VALID_TESTER_TB_NAMES = ['TB Rev3 Fedora 12 try-comm-central opt tests mozmill', 'TB Rev3 Fedora 12 try-comm-central opt tests xpcshell']
class TestTryParser(unittest.TestCase):
def test_BlankMessage(self):
# Should get default set with blank input
tm = ""
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
def test_JunkMessageBuilders(self):
# Should get default set with junk input
tm = "try: junk"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
def test_JunkMessageTesters(self):
# Should get default set with junk input to the test masters
tm = "try: junk"
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 Fedora 12 try opt test mochitests-1/5', 'Rev3 Fedora 12 try opt test mochitest-other', 'Rev3 Fedora 12 try opt test crashtest', 'Rev3 Fedora 12 try debug test mochitests-1/5', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 5.1 try opt test reftest', 'Rev3 WINNT 6.1 try opt test crashtest', 'Rev3 WINNT 6.1 try debug test crashtest', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitests-3/5']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_JunkBuildMessage(self):
# Should get default set with junk input for --build
tm = "try: -b k -p linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['Linux try build','Linux try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_DebugOnlyBuild(self):
tm = "try: -b d -p linux64,linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['Linux x86-64 try leak test build', 'Linux try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_OptOnlyBuild(self):
tm = "try: -b o -p macosx64,linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['OS X 10.6.2 try build', 'Linux try build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_BothBuildTypes(self):
# User can send 'do' or 'od' for both
tm = ['try: -b od -p win32','try: -b do -p win32']
for m in tm:
self.customBuilders = TryParser(m, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_SpecificPlatform(self):
# Testing a specific platform, eg: mac only
# should specify macosx and macosx64 to get opt and debug
tm = 'try: -b od -p macosx64,macosx'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['OS X 10.6.2 try build', 'OS X 10.6.2 try leak test build', 'OS X 10.5.2 try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_AllPlatformsBoth(self):
tm = 'try: -b od -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['OS X 10.6.2 try build', 'WINNT 5.2 try build', 'Linux x86-64 try build', 'Linux try build', 'OS X 10.5.2 try leak test build', 'OS X 10.6.2 try leak test build', 'WINNT 5.2 try leak test build', 'Linux x86-64 try leak test build', 'Linux try leak test build', 'Android R7 try build', 'Maemo 5 GTK try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllPlatformsOpt(self):
tm = 'try: -b o -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['OS X 10.6.2 try build', 'WINNT 5.2 try build', 'Linux x86-64 try build', 'Linux try build', 'Android R7 try build', 'Maemo 5 GTK try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllPlatformsDebug(self):
tm = 'try: -b d -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
builders = ['OS X 10.5.2 try leak test build', 'OS X 10.6.2 try leak test build', 'WINNT 5.2 try leak test build', 'Linux x86-64 try leak test build', 'Linux try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllOnTestMaster(self):
tm = 'try: -a'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 Fedora 12 try opt test mochitests-1/5', 'Rev3 Fedora 12 try opt test mochitest-other', 'Rev3 Fedora 12 try opt test crashtest', 'Rev3 Fedora 12 try debug test mochitests-1/5', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 5.1 try opt test reftest', 'Rev3 WINNT 6.1 try opt test crashtest', 'Rev3 WINNT 6.1 try debug test crashtest', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitests-3/5']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllOnTestMasterCC(self):
tm = 'try: -a'
self.customBuilders = TryParser(tm, VALID_TESTER_TB_NAMES, TESTER_PRETTY_TB_NAMES, None, UNITTEST_SUITES_TB, None, "try-comm-central")
builders = ['TB Rev3 Fedora 12 try-comm-central opt tests mozmill', 'TB Rev3 Fedora 12 try-comm-central opt tests xpcshell']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnBuilderMaster(self):
tm = 'try: -b od -p win32 -u mochitests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test mochitest-other', 'WINNT 5.2 try debug test mochitests-3/5', 'WINNT 5.2 try debug test mochitests-1/5',]
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-o'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnTestMaster(self):
tm = 'try: -b od -p all -u mochitests'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 Fedora 12 try opt test mochitests-1/5', 'Rev3 Fedora 12 try opt test mochitest-other', 'Rev3 Fedora 12 try debug test mochitests-1/5', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitests-3/5']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-o'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 WINNT 6.1 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnTestMasterDebugOnly(self):
tm = 'try: -b d -p all -u mochitests'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 Fedora 12 try debug test mochitests-1/5', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitests-3/5']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_BuildMasterDebugWin32Tests(self):
tm = 'try: -b d -p win32 -u mochitests'
# test in the getBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try debug test mochitest-other', 'WINNT 5.2 try debug test mochitests-3/5', 'WINNT 5.2 try debug test mochitests-1/5']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_ReftestAliases(self):
tm = 'try: -b d -p win32 -u reftests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try debug test reftest']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b d -p win32 -u reftest'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try debug test reftest']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
def test_ReftestMobileAliases(self):
tm = 'try: -b d -p win32 -u reftests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_REFTEST_NAMES, {}, UNITTEST_PRETTY_NAMES, MOBILE_UNITTEST_SUITES)
builders = ['WINNT 5.2 try debug test reftest-1/3', 'WINNT 5.2 try debug test reftest-3/3']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b d -p win32 -u reftest'
builders = ['WINNT 5.2 try debug test reftest-1/3', 'WINNT 5.2 try debug test reftest-3/3']
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_REFTEST_NAMES, {}, UNITTEST_PRETTY_NAMES, MOBILE_UNITTEST_SUITES)
self.assertEquals(sorted(self.customBuilders),sorted(builders))
def test_SelectTests(self):
tm = 'try: -b od -p win32 -u crashtest,mochitest-other'
# test in the getBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test crashtest', 'WINNT 5.2 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# test in the getTestBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 WINNT 6.1 try opt test crashtest', 'Rev3 WINNT 6.1 try debug test crashtest', 'Rev3 WINNT 6.1 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoTests(self):
tm = 'try: -b od -p linux,win32 -u none'
# test in getBuilders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['Linux try build', 'Linux try leak test build', 'WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# test in getTestBuilders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = []
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllTalos(self):
# should get all unittests too since that's the default set
tm = 'try: -b od -t all'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES, TALOS_SUITES)
self.assertEqual(sorted(self.customBuilders),sorted(VALID_TESTER_NAMES))
def test_SelecTalos(self):
tm = 'try: -b od -p win32 -t tp4'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
builders = ['Rev3 WINNT 6.1 try talos tp4', 'Rev3 WINNT 5.1 try talos tp4']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_SelecTalosWithNoTalosPlatforms(self):
tm = 'try: -b od -p win32,android-r7 -t tp4'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
builders = ['Rev3 WINNT 6.1 try talos tp4', 'Rev3 WINNT 5.1 try talos tp4']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoTalos(self):
tm = 'try: -b od -p linux,win32 -t none'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
builders = []
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_DebugWin32OnTestMaster(self):
tm = 'try: -b do -p win32 -u crashtest'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
builders = ['Rev3 WINNT 6.1 try debug test crashtest', 'Rev3 WINNT 6.1 try opt test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_HiddenCharactersAndOldSyntax(self):
tm = 'attributes\ntry: -b o -p linux64 -m none -u reftest -t none'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Linux x86-64 try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoBuildTypeSelected(self):
tm = 'try: -m none -u crashtest -p win32'
# should get both build types for the selected platform
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# should get debug win32 in the builder_master test builders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
builders = ['WINNT 5.2 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# should get both build types in test_builders
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
builders = ['Rev3 WINNT 6.1 try opt test crashtest', 'Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def _testNewLineProcessMessage(self, message, value=None):
if not value:
value = ['-a', '-b', '-c']
self.assertEqual(processMessage(message), value)
def test_SingleLine(self):
self._testNewLineProcessMessage("""try: -a -b -c""")
def test_SingleLineSpace(self):
self._testNewLineProcessMessage("""try: -a -b -c """)
def test_CommentSingleLine(self):
self._testNewLineProcessMessage("""blah blah try: -a -b -c""")
def test_CommentSingleLineSpace(self):
self._testNewLineProcessMessage("""blah blah try: -a -b -c """)
def test_FirstLineNewLine(self):
self._testNewLineProcessMessage("""try: -a -b -c
some other comment
lines
blah""")
def test_FirstLineSpaceNewLine(self):
self._testNewLineProcessMessage("""try: -a -b -c
some other comment
lines
blah""")
def test_CommentFirstLineNewLine(self):
self._testNewLineProcessMessage("""blah blah try: -a -b -c
some other comment
lines
blah""")
def test_CommentFirstLineSpaceNewLine(self):
self._testNewLineProcessMessage("""blah blah try: -a -b -c
some other comment
lines
blah""")
def test_MiddleLineNewLine(self):
self._testNewLineProcessMessage("""blah blah
try: -a -b -c
some other comment
lines
blah""")
def test_MiddleLineSpaceNewLine(self):
self._testNewLineProcessMessage("""blah blah
try: -a -b -c
some other comment
lines
blah""")
def test_CommentMiddleLineNewLine(self):
self._testNewLineProcessMessage("""blah blah
blah blah try: -a -b -c
some other comment
lines
blah""")
def test_CommentMiddleLineSpaceNewLine(self):
self._testNewLineProcessMessage("""blah blah
blah blah try: -a -b -c
some other comment
lines
blah""")
def test_LastLine(self):
self._testNewLineProcessMessage("""blah blah
some other comment
lines
try: -a -b -c""")
def test_LastLineSpace(self):
self._testNewLineProcessMessage("""blah blah
some other comment
lines
try: -a -b -c """)
def test_CommentLastLine(self):
self._testNewLineProcessMessage("""blah blah
some other comment
lines
blah blah try: -a -b -c""")
def test_CommentLastLineSpace(self):
self._testNewLineProcessMessage("""blah blah
some other comment
lines
blah blah try: -a -b -c """)
def test_DuplicateTryLines(self):
self._testNewLineProcessMessage("""try: -a -b -c
try: -this -should -be -ignored""")
def test_IgnoreTryColonNoSpace(self):
self._testNewLineProcessMessage("""Should ignore this try:
try: -a -b -c""")
if __name__ == '__main__':
unittest.main()