tests/test-bad-extension.t
changeset 49877 950c39918bd2
parent 48874 af0b21d5a930
child 49878 f68b0a5d3211
equal deleted inserted replaced
49876:a77c1375c316 49877:950c39918bd2
    51   > badext2 =
    51   > badext2 =
    52   > EOF
    52   > EOF
    53 
    53 
    54   $ hg -q help help 2>&1 |grep extension
    54   $ hg -q help help 2>&1 |grep extension
    55   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
    55   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
    56   *** failed to import extension "badext2": No module named 'badext2' (py3 !)
    56   *** failed to import extension "badext2": No module named 'badext2'
    57 
    57 
    58 show traceback
    58 show traceback
    59 
    59 
    60   $ hg -q help help --traceback 2>&1 | egrep ' extension|^Exception|Traceback|ImportError|ModuleNotFound'
    60   $ hg -q help help --traceback 2>&1 | egrep ' extension|^Exception|Traceback|ImportError|ModuleNotFound'
    61   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
    61   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
    62   Traceback (most recent call last):
    62   Traceback (most recent call last):
    63   Exception: bit bucket overflow
    63   Exception: bit bucket overflow
    64   *** failed to import extension "badext2": No module named 'badext2' (py3 !)
    64   *** failed to import extension "badext2": No module named 'badext2'
    65   Traceback (most recent call last):
    65   Traceback (most recent call last):
    66   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
    66   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
    67   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
    67   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
    68   Traceback (most recent call last): (py3 !)
    68   Traceback (most recent call last):
    69   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
    69   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
    70   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
    70   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
    71   Traceback (most recent call last): (py3 !)
    71   Traceback (most recent call last):
    72   ImportError: No module named 'badext2' (py3 no-py36 !)
    72   ImportError: No module named 'badext2' (py3 no-py36 !)
    73   ModuleNotFoundError: No module named 'badext2' (py36 !)
    73   ModuleNotFoundError: No module named 'badext2' (py36 !)
    74 
    74 
    75 names of extensions failed to load can be accessed via extensions.notloaded()
    75 names of extensions failed to load can be accessed via extensions.notloaded()
    76 
    76 
   115   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   115   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   116   YYYY/MM/DD HH:MM:SS (PID)>     - could not import hgext3rd.badext2 (No module named *badext2*): trying badext2 (glob)
   116   YYYY/MM/DD HH:MM:SS (PID)>     - could not import hgext3rd.badext2 (No module named *badext2*): trying badext2 (glob)
   117   Traceback (most recent call last):
   117   Traceback (most recent call last):
   118   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
   118   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
   119   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   119   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   120   Traceback (most recent call last): (py3 !)
   120   Traceback (most recent call last):
   121   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
   121   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
   122   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
   122   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
   123   *** failed to import extension "badext2": No module named 'badext2' (py3 !)
   123   *** failed to import extension "badext2": No module named 'badext2'
   124   Traceback (most recent call last):
   124   Traceback (most recent call last):
   125   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
   125   ImportError: No module named 'hgext.badext2' (py3 no-py36 !)
   126   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   126   ModuleNotFoundError: No module named 'hgext.badext2' (py36 !)
   127   Traceback (most recent call last): (py3 !)
   127   Traceback (most recent call last):
   128   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
   128   ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !)
   129   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
   129   ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !)
   130   Traceback (most recent call last): (py3 !)
   130   Traceback (most recent call last):
   131   ModuleNotFoundError: No module named 'badext2' (py36 !)
   131   ModuleNotFoundError: No module named 'badext2' (py36 !)
   132   ImportError: No module named 'badext2' (py3 no-py36 !)
   132   ImportError: No module named 'badext2' (py3 no-py36 !)
   133   YYYY/MM/DD HH:MM:SS (PID)> > loaded 2 extensions, total time * (glob)
   133   YYYY/MM/DD HH:MM:SS (PID)> > loaded 2 extensions, total time * (glob)
   134   YYYY/MM/DD HH:MM:SS (PID)> - loading configtable attributes
   134   YYYY/MM/DD HH:MM:SS (PID)> - loading configtable attributes
   135   YYYY/MM/DD HH:MM:SS (PID)> - executing uisetup hooks
   135   YYYY/MM/DD HH:MM:SS (PID)> - executing uisetup hooks
   155 
   155 
   156 confirm that there's no crash when an extension's documentation is bad
   156 confirm that there's no crash when an extension's documentation is bad
   157 
   157 
   158   $ hg help --keyword baddocext
   158   $ hg help --keyword baddocext
   159   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
   159   *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow
   160   *** failed to import extension "badext2": No module named 'badext2' (py3 !)
   160   *** failed to import extension "badext2": No module named 'badext2'
   161   Topics:
   161   Topics:
   162   
   162   
   163    extensions Using Additional Features
   163    extensions Using Additional Features