~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_source.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-21 17:09:54 UTC
  • mfrom: (5385.1.1 trivial-NEWS-fileencoding)
  • Revision ID: pqm@pqm.ubuntu.com-20100821170954-efrj80bvw56s5mzc
(parthm) Remove 'encoding' option from NEWS modeline as its an error in Vim
 7.3+ (Parth Malwankar)

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 '):