[pypy-commit] pypy py3k: tweak the test runner's custom AssertionError to pass

pjenvey noreply at buildbot.pypy.org
Wed May 7 00:25:29 CEST 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71348:920ff3e631b2
Date: 2014-05-06 15:23 -0700
http://bitbucket.org/pypy/pypy/changeset/920ff3e631b2/

Log:	tweak the test runner's custom AssertionError to pass
	test_exc.test_doc_and_module

diff --git a/pypy/tool/pytest/appsupport.py b/pypy/tool/pytest/appsupport.py
--- a/pypy/tool/pytest/appsupport.py
+++ b/pypy/tool/pytest/appsupport.py
@@ -197,6 +197,9 @@
     w_init = space.wrap(gateway.interp2app_temp(my_init))
     w_dict = space.getattr(w_BuiltinAssertionError, space.wrap('__dict__'))
     w_dict = space.call_method(w_dict, 'copy')
+    # fixup __module__, since the new type will be is_heaptype() == True
+    w_dict.setitem_str('__module__', space.getattr(w_BuiltinAssertionError,
+                                                   space.wrap('__module__')))
     space.setitem(w_dict, space.wrap('__init__'), w_init)
     return space.call_function(w_metaclass,
                                space.wrap('AssertionError'),


More information about the pypy-commit mailing list