Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r82788:72ff295d1274
Date: 2016-03-05 17:01 +0100
http://bitbucket.org/pypy/pypy/changeset/72ff295d1274/

Log:    improve the test to check that __thisclass__ returns the first
        argument, and not e.g. the class of the instance

diff --git a/pypy/module/__builtin__/test/test_descriptor.py 
b/pypy/module/__builtin__/test/test_descriptor.py
--- a/pypy/module/__builtin__/test/test_descriptor.py
+++ b/pypy/module/__builtin__/test/test_descriptor.py
@@ -244,6 +244,11 @@
 
         assert super(A, A()).__thisclass__ is A
 
+        class B(A):
+            pass
+
+        assert super(B, B()).__thisclass__ is B
+        assert super(A, B()).__thisclass__ is A
 
     def test_property_docstring(self):
         assert property.__doc__.startswith('property')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to