/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-24 04:24:57 UTC
  • mfrom: (4183.6.5 251352-re-compile)
  • Revision ID: pqm@pqm.ubuntu.com-20090324042457-53xouxxcxehxoi5v
(mbp) better error on bad regexps

Show diffs side-by-side

added added

removed removed

Lines of Context:
2434
2434
    :param pattern: A regular expression string.
2435
2435
    :return: A callable that returns True if the re matches.
2436
2436
    """
2437
 
    filter_re = re.compile(pattern)
 
2437
    filter_re = osutils.re_compile_checked(pattern, 0,
 
2438
        'test filter')
2438
2439
    def condition(test):
2439
2440
        test_id = test.id()
2440
2441
        return filter_re.search(test_id)