Author: Richard Plangger <[email protected]>
Branch: memoryview-attributes
Changeset: r86409:092eb3a20315
Date: 2016-08-22 11:25 +0200
http://bitbucket.org/pypy/pypy/changeset/092eb3a20315/
Log: add newbytes method to tinyobjspace (as cfbolz suggested)
diff --git a/pypy/module/_jitlog/test/test__jitlog.py
b/pypy/module/_jitlog/test/test__jitlog.py
--- a/pypy/module/_jitlog/test/test__jitlog.py
+++ b/pypy/module/_jitlog/test/test__jitlog.py
@@ -10,10 +10,10 @@
def setup_class(cls):
cls.w_tmpfilename = cls.space.wrap(str(udir.join('test__jitlog.1')))
- cls.w_mark_header = cls.space.wrap(jl.MARK_JITLOG_HEADER)
- cls.w_version = cls.space.wrap(jl.JITLOG_VERSION_16BIT_LE)
+ cls.w_mark_header = cls.space.newbytes(jl.MARK_JITLOG_HEADER)
+ cls.w_version = cls.space.newbytes(jl.JITLOG_VERSION_16BIT_LE)
cls.w_is_32bit = cls.space.wrap(sys.maxint == 2**31-1)
- cls.w_machine = cls.space.wrap(platform.machine())
+ cls.w_machine = cls.space.newbytes(platform.machine())
cls.w_resops = cls.space.newdict()
space = cls.space
for key, value in opname.items():
diff --git a/pypy/tool/pytest/objspace.py b/pypy/tool/pytest/objspace.py
--- a/pypy/tool/pytest/objspace.py
+++ b/pypy/tool/pytest/objspace.py
@@ -107,6 +107,9 @@
def newlist(self, iterable):
return list(iterable)
+ def newbytes(self, obj):
+ return bytes(obj)
+
def call_function(self, func, *args, **kwds):
return func(*args, **kwds)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit