← Back to team overview

testtools-dev team mailing list archive

[Bug 704219] Re: wish for invertible matchers

 

** Changed in: testtools
       Status: New => Triaged

** Changed in: testtools
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
https://bugs.launchpad.net/bugs/704219

Title:
  wish for invertible matchers

Status in testtools:
  Triaged

Bug description:
  I can define ContainsRegexp(r'\d+') and match against it, and then
  also say Not(ContainsRegexp(r'\d+')) and this works. However, in the
  latter case, what I'd really like to get is something like

    "unexpectedly matched '\\d+' in 'route66' at '66'"

  rather than just being told the matcher passed successfully.

  I can just define NotContainsRegexp that has the same behavior but
  gives better mismatches.  But I wonder if this should fall out in a
  cleaner way.





Follow ups

References