Code review comment for lp://qastaging/~gz/pyjunitxml/split_test_id_before_parameter

Revision history for this message
Martin Packman (gz) wrote :

> Meh, of course, why did I read this find as a rfind...

Because that line isn't very easy to read, or obvious in what it's doing. Splitting it up doesn't really help though, so I'm relying on people trusting the comment.

> Meh for you this time :-p Why would it break ?

Well, why should another fancy id scheme not use some non-word characters as a prefix rather than suffix?

> Bah, maybe I've used perl too much:
>
> ($class, $test) = $id =~ /^([.\w]+)\.(\w+.*$)/
>
> No useless variables, no if, no split, no slice, no nuthin :)

Python just isn't very good at string-wrangling, I don't think that's controversial. Not having to think for five minutes about what every line of code actually means does have benefits though. :)

« Back to merge proposal