5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | |
def invoke(assertion=False, compile=False): |
""" invoke magic, currently you can specify: |
|
assertion patches the builtin AssertionError to try to give |
more meaningful AssertionErrors, which by means |
of deploying a mini-interpreter constructs |
a useful error message. |
""" |
if assertion: |
from py.__.magic import assertion |
assertion.invoke() |
if compile: |
py.magic.patch(cpy_builtin, 'compile', py.code.compile ) | |