211
212
cmd.check_process_format('e+ e- > mu+ ta- / x $y @1')
212
213
cmd.check_process_format('e+ e- > mu+ ta- $ x /y @1')
213
214
cmd.check_process_format('e+ e- > mu+ ta- $ x /y, (e+ > e-, e-> ta) @1')
215
cmd.check_process_format('e+ e- > Z{L}, Z > mu+ mu- @1')
216
cmd.check_process_format('e+ e- > Z{0}, Z > mu+ mu- @1')
217
cmd.check_process_format('e+{L} e- > mu+{L} mu-{R} @1')
218
cmd.check_process_format('e+ e- > t{L} t~ Z{L}, t > mu+ mu- @1')
219
cmd.check_process_format('g g > Z Z [ noborn=QCD] @1')
220
cmd.check_process_format('u u~ > 2w+ 2j')
221
cmd.check_process_format('u u~ > 2w+{0} 2j')
216
224
self.wrong(cmd.check_process_format, ' e+ e-')
223
231
self.wrong(cmd.check_process_format, ' e+ > e+, (e+ > e- / z, e- > top')
224
232
self.wrong(cmd.check_process_format, 'e+ > ')
225
233
self.wrong(cmd.check_process_format, 'e+ >')
234
self.wrong(cmd.check_process_format, 'e+ e- > Z{L} > mu+ mu-')
235
self.wrong(cmd.check_process_format, 'e+ e- > Z > mu+ mu- / W+{L}')
236
self.wrong(cmd.check_process_format, 'e+ e- > Z > mu+ mu- $ W+{L}')
237
self.wrong(cmd.check_process_format, 'u u~ > t{L} t~ [QCD]')
238
self.wrong(cmd.check_process_format, 'u u~ > W+{L} vl [ QED QCD]')
239
self.wrong(cmd.check_process_format,'u u~ > w+{L} [QCD]')
240
self.wrong(cmd.check_process_format,'u u~ > e+{L} vl [QCD]')
227
242
@test_aloha.set_global()
228
243
def test_output_default(self):
236
251
cmd.check_output([])
238
253
self.assertNotEqual('tmp', cmd._export_dir)
255
@test_aloha.set_global()
256
def test_simple_generate(self):
257
"""check that simple syntax goes trough and return expected process"""
260
self.do('import model sm')
261
self.do('generate 2p > 2j')
262
self.assertTrue(cmd._curr_amps)
263
proc = cmd._curr_amps[0].get('process').get('legs')
264
self.assertEqual(len(proc), 4)
241
268
class TestExtendedCmd(unittest.TestCase):
310
337
self.assertEqual(output, set([-11, 11, -13, 13, 1, 2, 3, 4, 21, -1, -2,-3,-4]))
312
339
output = self.cmd.get_final_part(' p p > t t~ [ all = QCD ] , (t > b z, z > l+ l-) ')
313
self.assertEqual(output, set([-11, 11, -13, 13, -6, 5]))
340
self.assertEqual(output, set([-11, 11, -13, 13, -6, 5]))
342
output = self.cmd.get_final_part('p p > 2Z')
343
self.assertEqual(output, set([23]))
345
output = self.cmd.get_final_part('p p > Z{L} j')
346
self.assertEqual(output, set([1, 2, 3, 4, -1, 21, -4, -3, -2, 23]))
348
output = self.cmd.get_final_part('p p > Z{L} j, Z > e+ e-')
349
self.assertEqual(output, set([1, 2, 3, 4, -1, 21, -4, -3, -2, 11, -11]))
351
output = self.cmd.get_final_part('p p > 2Z{L} ')
352
self.assertEqual(output, set([23]))
354
output = self.cmd.get_final_part('p p > 2Z{L} j, Z > e+ e-')
355
self.assertEqual(output, set([1, 2, 3, 4, -1, 21, -4, -3, -2, 11, -11]))