[pypy-commit] pypy py3k: import the types directly from __exception__ instead of builtins. This makes a difference because the conftest overrides the AssertionError in the builtins, but we want to test our own

antocuni noreply at buildbot.pypy.org
Fri Jul 13 00:50:16 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r56048:97ac1994450a
Date: 2012-07-13 00:49 +0200
http://bitbucket.org/pypy/pypy/changeset/97ac1994450a/

Log:	import the types directly from __exception__ instead of builtins.
	This makes a difference because the conftest overrides the
	AssertionError in the builtins, but we want to test our own

diff --git a/pypy/module/exceptions/test/test_exc.py b/pypy/module/exceptions/test/test_exc.py
--- a/pypy/module/exceptions/test/test_exc.py
+++ b/pypy/module/exceptions/test/test_exc.py
@@ -188,8 +188,8 @@
         assert not isinstance(c, KeyError)
 
     def test_doc_and_module(self):
-        import builtins
-        for name, e in builtins.__dict__.items():
+        import __exceptions__
+        for name, e in __exceptions__.__dict__.items():
             if isinstance(e, type) and issubclass(e, BaseException):
                 assert e.__doc__, e
                 assert e.__module__ == 'builtins', e


More information about the pypy-commit mailing list