Author: Armin Rigo <[email protected]>
Branch: buffer-interface
Changeset: r86860:73e7b767d5f7
Date: 2016-09-04 14:19 +0200
http://bitbucket.org/pypy/pypy/changeset/73e7b767d5f7/
Log: Fix for test_zjit by explicitly disabling the W_MemoryView case here
diff --git a/pypy/module/micronumpy/test/test_zjit.py
b/pypy/module/micronumpy/test/test_zjit.py
--- a/pypy/module/micronumpy/test/test_zjit.py
+++ b/pypy/module/micronumpy/test/test_zjit.py
@@ -97,7 +97,16 @@
print "ERROR: did not implement return type for interpreter"
raise TypeError(w_res)
- if self.graph is None:
+ if self.graph is not None:
+ return
+
+ from pypy.module.micronumpy import ctors
+ def unimplemented(*args):
+ "Only for W_MemoryView objects, which are not compiled in"
+ raise NotImplementedError
+ prev_3118 = ctors._array_from_buffer_3118
+ ctors._array_from_buffer_3118 = unimplemented
+ try:
interp, graph = self.meta_interp(f, [0],
listops=True,
listcomp=True,
@@ -107,6 +116,8 @@
vec=True)
self.__class__.interp = interp
self.__class__.graph = graph
+ finally:
+ ctors._array_from_buffer_3118 = prev_3118
def check_vectorized(self, expected_tried, expected_success):
profiler = get_profiler()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit