~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_source.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-20 19:07:17 UTC
  • mfrom: (5385 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5389.
  • Revision ID: jelmer@samba.org-20100820190717-txm7aiyh6wtumgd3
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
388
388
        """
389
389
        both_exc_and_no_exc = []
390
390
        missing_except = []
391
 
        class_re = re.compile(r'^(cdef\s+)?(public\s+)?'
392
 
                              r'(api\s+)?class (\w+).*:', re.MULTILINE)
393
 
        extern_class_re = re.compile(r'## extern cdef class (\w+)',
394
 
                                     re.MULTILINE)
 
391
        class_re = re.compile(r'^(cdef\s+)?(public\s+)?(api\s+)?class (\w+).*:',
 
392
                              re.MULTILINE)
395
393
        except_re = re.compile(r'cdef\s+' # start with cdef
396
394
                               r'([\w *]*?)\s*' # this is the return signature
397
395
                               r'(\w+)\s*\(' # the function name
402
400
        for fname, text in self.get_source_file_contents(
403
401
                extensions=('.pyx',)):
404
402
            known_classes = set([m[-1] for m in class_re.findall(text)])
405
 
            known_classes.update(extern_class_re.findall(text))
406
403
            cdefs = except_re.findall(text)
407
404
            for sig, func, exc_clause, no_exc_comment in cdefs:
408
405
                if sig.startswith('api '):