~testtools-dev/testtools/trunk

« back to all changes in this revision

Viewing changes to testtools/tests/test_matchers.py

  • Committer: Jonathan Lange
  • Date: 2011-07-31 13:41:45 UTC
  • mfrom: (219.1.2 nicer-regex-fail)
  • Revision ID: jml@canonical.com-20110731134145-h9stgz8xzyy18093
Nicer regex error message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
         MatchesException(Exception, 'fo.'))
259
259
        ]
260
260
    describe_examples = [
261
 
        ("'bar' does not match 'fo.'",
 
261
        ("'bar' does not match /fo./",
262
262
         error_bar, MatchesException(ValueError, "fo.")),
263
263
        ]
264
264
 
639
639
        ]
640
640
 
641
641
    describe_examples = [
642
 
        ("'c' does not match 'a|b'", 'c', MatchesRegex('a|b')),
 
642
        ("'c' does not match /a|b/", 'c', MatchesRegex('a|b')),
 
643
        ("'c' does not match /a\d/", 'c', MatchesRegex(r'a\d')),
643
644
        ]
644
645
 
645
646