Slow tests
Harald Meland
harald.meland at usit.uio.no
Fri Sep 18 01:38:32 BST 2009
[Martin Pool]
> I'm talking about a case like this:
>
> """Hi Harald, what happens with an
> assert statement
> on a line within a triple-quoted string?"""
>
> You probably can write a regexp to match it, but I'm not sure it matters.
I wouldn't want to write a regexp catching that case; I'd rather keep
the regexp simple, let it give a false positive on things like the
above example, pass the file it appears in on to the AST processing,
and let that decide whether there actually was any assert statements
in the file.
The difference between the simple and the more complex regexp becomes
clear when you have a line like this:
# assert foo < bar
The simple regexp will treat this as a potential assert statement, so
the file will be passed on to the AST processing. The more complex
regexp, however, will *not* match on that line, so AST processing of
the corresponding file can be avoided.
I think we may be talking past each other; the merge I've proposed is
quite small, and as I've said, we can get back to discussing the
merits of using more complex regexps once people have had a look at
the simple one.
--
Harald
More information about the bazaar
mailing list