/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 breezy/tests/test_source.py

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2018-07-15 09:48:59 UTC
  • mfrom: (7038.1.5 btree_serializer_pyx_py3)
  • Revision ID: breezy.the.bot@gmail.com-20180715094859-2kha7mnbwhd0op7s
Make _btree_serializer_pyx module work on Python 3

Merged from https://code.launchpad.net/~gz/brz/btree_serializer_pyx_py3/+merge/349624

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
        """
368
368
        both_exc_and_no_exc = []
369
369
        missing_except = []
 
370
        common_classes = ('StaticTuple',)
370
371
        class_re = re.compile(r'^(cdef\s+)?(public\s+)?'
371
372
                              r'(api\s+)?class (\w+).*:', re.MULTILINE)
372
 
        extern_class_re = re.compile(r'## extern cdef class (\w+)',
373
 
                                     re.MULTILINE)
374
373
        except_re = re.compile(
375
374
            r'cdef\s+'        # start with cdef
376
375
            r'([\w *]*?)\s*'  # this is the return signature
381
380
        for fname, text in self.get_source_file_contents(
382
381
                extensions=('.pyx',)):
383
382
            known_classes = {m[-1] for m in class_re.findall(text)}
384
 
            known_classes.update(extern_class_re.findall(text))
 
383
            known_classes.update(common_classes)
385
384
            cdefs = except_re.findall(text)
386
385
            for sig, func, exc_clause, no_exc_comment in cdefs:
387
386
                if sig.startswith('api '):