Code review comment for lp:~maddevelopers/mg5amcnlo/1.5.8

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Johan,

> Doesn't this just check that the parser parses the same values both times it reads?

A bit more than that since the first time we parse the input and the second the string which is the output of the str(event).
So we test that writing routine is coherent with the reading routine.

> I don't see that you are checking that the values are in fact correct.

Not sure to see which type to check you want.

Cheers,

Olivier

On Mar 4, 2013, at 5:48 AM, Johan Alwall <email address hidden> wrote:

> Review: Needs Information
>
> Hello Olivier,
>
> Thanks a lot for adding the tests! I just have a question: Looking at your test for the .lhe parser, I don't understand the following:
>> + nb_event = 0
>> + for event in input:
>> + nb_event +=1
>> + new = lhe_parser.Event(text=str(event))
>> + for part1,part2 in zip(event, new):
>> + self.assertEqual(part1, part2)
>> + self.assertEqual(new, event, '%s \n !=\n %s' % (new, event))
>> + self.assertEqual(nb_event, 3)
>
> Doesn't this just check that the parser parses the same values both times it reads? I don't see that you are checking that the values are in fact correct.
>
> Cheers,
> Johan
> --
> https://code.launchpad.net/~maddevelopers/madgraph5/1.5.8/+merge/150437
> You proposed lp:~maddevelopers/madgraph5/1.5.8 for merging.

« Back to merge proposal