Way too many slashes in MatchesRegex mismatch

Bug #818080 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Triaged
Wishlist
Unassigned

Bug Description

e.g.

AssertionError: '' does not match '\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d,\\d\\d\\d - INFO - first\\n\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d,\\d\\d\\d - INFO - second\\n'

=== modified file 'testtools/matchers.py'
--- testtools/matchers.py 2011-07-27 19:47:22 +0000
+++ testtools/matchers.py 2011-07-29 14:26:48 +0000
@@ -730,7 +730,7 @@ class MatchesRegex(object):

     def match(self, value):
         if not re.match(self.pattern, value, self.flags):
- return Mismatch("%r does not match %r" % (value, self.pattern))
+ return Mismatch("%r does not match %s" % (value, self.pattern))

 class MatchesSetwise(object):

probably fixes it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.