Commit d088f059 authored by holger krekel's avatar holger krekel

use pytest-2.0.3.dev1 which lazy-imports zlib and others in genscript plugin

parent 4c731b9d
""" generate a single-file self-contained version of py.test """
import py
import pickle
import zlib
import base64
def find_toplevel(name):
for syspath in py.std.sys.path:
......@@ -31,9 +28,9 @@ def pkg_to_mapping(name):
return name2src
def compress_mapping(mapping):
data = pickle.dumps(mapping, 2)
data = zlib.compress(data, 9)
data = base64.encodestring(data)
data = py.std.pickle.dumps(mapping, 2)
data = py.std.zlib.compress(data, 9)
data = py.std.base64.encodestring(data)
data = data.decode('ascii')
return data
......@@ -44,7 +41,6 @@ def compress_packages(names):
mapping.update(pkg_to_mapping(name))
return compress_mapping(mapping)
def generate_script(entry, packages):
data = compress_packages(packages)
tmpl = py.path.local(__file__).dirpath().join('standalonetemplate.py')
......
......@@ -3,7 +3,7 @@ unit and functional testing with Python.
(pypy version of startup script)
see http://pytest.org for details.
"""
__version__ = '2.0.3.dev0' # base pytest version
__version__ = '2.0.3.dev1' # base pytest version
__all__ = ['main']
from _pytest.core import main, UsageError, _preloadplugins
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment