[pypy-commit] pypy mappingproxy: Fix tests for compatibility with CPython, which makes them pass on this branch as well

rlamy pypy.commits at gmail.com
Thu Aug 4 11:15:26 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: mappingproxy
Changeset: r86013:2467b1a9d1ba
Date: 2016-08-04 16:14 +0100
http://bitbucket.org/pypy/pypy/changeset/2467b1a9d1ba/

Log:	Fix tests for compatibility with CPython, which makes them pass on
	this branch as well

diff --git a/pypy/objspace/std/test/test_typeobject.py b/pypy/objspace/std/test/test_typeobject.py
--- a/pypy/objspace/std/test/test_typeobject.py
+++ b/pypy/objspace/std/test/test_typeobject.py
@@ -970,7 +970,6 @@
         raises(TypeError, setattr, list, 'foobar', 42)
         raises(TypeError, delattr, dict, 'keys')
         raises(TypeError, 'int.__dict__["a"] = 1')
-        raises(TypeError, 'int.__dict__.clear()')
 
     def test_nontype_in_mro(self):
         class OldStyle:
@@ -1028,10 +1027,9 @@
             pass
 
         a = A()
+        d = A.__dict__
         A.x = 1
-        assert A.__dict__["x"] == 1
-        A.__dict__['x'] = 5
-        assert A.x == 5
+        assert d["x"] == 1
 
     def test_we_already_got_one_1(self):
         # Issue #2079: highly obscure: CPython complains if we say


More information about the pypy-commit mailing list