On Tue, 2011-05-03 at 16:56 +0100, Julian Foad wrote: > On Tue, 2011-05-03 at 18:46 +0300, Daniel Shahaf wrote: > > Julian Foad wrote on Tue, May 03, 2011 at 14:31:47 +0100: > > > + # Check recursive info. > > > + # ### This is currently dependent on ordering of the dict entries. > > > + expected_infos = [{ 'Path' : r'.*[/\\]G' }] > > > for fname, action, reason in scenarios: > > > + expected_str = ".*local %s, incoming %s.*" % (reason, action) > > > + expected_infos.append({ 'Name' : fname, > > > + 'Tree conflict' : expected_str }) > > > > I guess you want re.escape() here, at least for fname. (Formally you > > need it for expected_str too, unless you rely on knowing that REASON and > > ACTION don't contain regex metachars.) > > Well, FNAME is matched as a simple string (not a regex)
Oops, I was confusing FNAME with the dictionary key. It's not a key; you're right. Thanks. - Julian > and I do know > that REASON and ACTION don't contain metachars. > > - Julian > >