fix location of magic AssertionError
--HG-- branch : trunk
This commit is contained in:
parent
783e6aeb4d
commit
c23cc3656c
|
@ -133,7 +133,7 @@ initpkg(__name__,
|
|||
'code.getrawcode' : ('./code/code.py', 'getrawcode'),
|
||||
'code.patch_builtins' : ('./code/code.py', 'patch_builtins'),
|
||||
'code.unpatch_builtins' : ('./code/code.py', 'unpatch_builtins'),
|
||||
'code._AssertionError' : ('./code/assertion.py', 'AssertionError'),
|
||||
'code._AssertionError' : ('./code/_assertion.py', 'AssertionError'),
|
||||
|
||||
# backports and additions of builtins
|
||||
'builtin.__doc__' : ('./builtin/__init__.py', '__doc__'),
|
||||
|
|
|
@ -739,10 +739,10 @@ oldbuiltins = {}
|
|||
def patch_builtins(assertion=True, compile=True):
|
||||
""" put compile and AssertionError builtins to Python's builtins. """
|
||||
if assertion:
|
||||
from py.__.code import assertion
|
||||
from py.__.code import _assertion
|
||||
l = oldbuiltins.setdefault('AssertionError', [])
|
||||
l.append(py.builtin.builtins.AssertionError)
|
||||
py.builtin.builtins.AssertionError = assertion.AssertionError
|
||||
py.builtin.builtins.AssertionError = _assertion.AssertionError
|
||||
if compile:
|
||||
l = oldbuiltins.setdefault('compile', [])
|
||||
l.append(py.builtin.builtins.compile)
|
||||
|
|
Loading…
Reference in New Issue