~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Parth Malwankar
  • Date: 2010-06-30 12:03:30 UTC
  • mto: This revision was merged to the branch mainline in revision 5339.
  • Revision ID: parth.malwankar@gmail.com-20100630120330-uud7s38i8s08izh8
added InvalidPattern error.
This is raised by lazy_regex and Globster on bad regex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2744
2744
    :param pattern: A regular expression string.
2745
2745
    :return: A callable that returns True if the re matches.
2746
2746
    """
2747
 
    filter_re = osutils.re_compile_checked(pattern, 0,
2748
 
        'test filter')
 
2747
    filter_re = re.compile(pattern, 0)
2749
2748
    def condition(test):
2750
2749
        test_id = test.id()
2751
2750
        return filter_re.search(test_id)