tests/test-check-code.t
changeset 30540 d955cebd8d6a
parent 30435 b86a448a2965
child 30541 342d0cb4f446
equal deleted inserted replaced
30539:29b35dac3b1f 30540:d955cebd8d6a
    16   Skipping hgext/fsmonitor/pywatchman/pybser.py it has no-che?k-code (glob)
    16   Skipping hgext/fsmonitor/pywatchman/pybser.py it has no-che?k-code (glob)
    17   Skipping i18n/polib.py it has no-che?k-code (glob)
    17   Skipping i18n/polib.py it has no-che?k-code (glob)
    18   Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
    18   Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
    19   Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
    19   Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
    20   Skipping mercurial/statprof.py it has no-che?k-code (glob)
    20   Skipping mercurial/statprof.py it has no-che?k-code (glob)
       
    21 
       
    22 @commands in debugcommands.py should be in alphabetical order.
       
    23 
       
    24   >>> import re
       
    25   >>> commands = []
       
    26   >>> with open('mercurial/debugcommands.py', 'rb') as fh:
       
    27   ...     for line in fh:
       
    28   ...         m = re.match("^@command\('([a-z]+)", line)
       
    29   ...         if m:
       
    30   ...             commands.append(m.group(1))
       
    31   >>> scommands = list(sorted(commands))
       
    32   >>> for i, command in enumerate(scommands):
       
    33   ...     if command != commands[i]:
       
    34   ...         print('commands in debugcommands.py not sorted; first differing '
       
    35   ...               'command is %s; expected %s' % (commands[i], command))
       
    36   ...         break
       
    37   commands in debugcommands.py not sorted; first differing command is debugbuilddag; expected debugapplystreamclonebundle