rewrote the initpkg mechanism and moved py lib implementation files to
_py/... with py/__init__.py containing pointers into them The new apipkg is only around 70 lines of code and allows us to get rid of the infamous "py.__." by regular non-magical "_py." imports. It is also available as a separately installable package, see http://bitbucket.org/hpk42/apipkg --HG-- branch : trunk
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from __future__ import generators
|
||||
import py
|
||||
import sys
|
||||
from py.__.code.code import safe_repr
|
||||
from _py.code.code import safe_repr
|
||||
|
||||
def test_newcode():
|
||||
source = "i = 3"
|
||||
@@ -157,7 +157,7 @@ class TestSafeRepr:
|
||||
assert 'TypeError' in safe_repr(BrokenRepr("string"))
|
||||
|
||||
def test_big_repr(self):
|
||||
from py.__.code.code import SafeRepr
|
||||
from _py.code.code import SafeRepr
|
||||
assert len(safe_repr(range(1000))) <= \
|
||||
len('[' + SafeRepr().maxlist * "1000" + ']')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user