Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r84305:95430613866d
Date: 2016-05-08 11:25 -0700
http://bitbucket.org/pypy/pypy/changeset/95430613866d/

Log:    kill test_immutabledoc

diff --git a/pypy/interpreter/test/test_class.py 
b/pypy/interpreter/test/test_class.py
--- a/pypy/interpreter/test/test_class.py
+++ b/pypy/interpreter/test/test_class.py
@@ -123,14 +123,3 @@
         assert C.__qualname__ == 'test_qualname.<locals>.C'
         assert C.D.__qualname__ == 'test_qualname.<locals>.C.D'
         assert not hasattr(C(), '__qualname__')
-
-    def test_set_doc(self):
-        class X:
-            "elephant"
-        X.__doc__ = "banana"
-        assert X.__doc__ == "banana"
-        raises(TypeError, lambda:
-               type(list).__dict__["__doc__"].__set__(list, "blah"))
-        raises((AttributeError, TypeError), lambda:
-               type(X).__dict__["__doc__"].__delete__(X))
-        assert X.__doc__ == "banana"
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
@@ -500,22 +500,16 @@
 
         assert ImplicitDoc.__doc__ == 'foo'
 
-    def test_immutabledoc(self):
-        class ImmutableDoc(object):
-            "foo"
-
-        try:
-            ImmutableDoc.__doc__ = "bar"
-        except TypeError:
-            pass
-        except AttributeError:
-            # XXX - Python raises TypeError for several descriptors,
-            #       we always raise AttributeError.
-            pass
-        else:
-            raise AssertionError('__doc__ should not be writable')
-
-        assert ImmutableDoc.__doc__ == 'foo'
+    def test_set_doc(self):
+        class X:
+            "elephant"
+        X.__doc__ = "banana"
+        assert X.__doc__ == "banana"
+        raises(TypeError, lambda:
+               type(list).__dict__["__doc__"].__set__(list, "blah"))
+        raises((AttributeError, TypeError), lambda:
+               type(X).__dict__["__doc__"].__delete__(X))
+        assert X.__doc__ == "banana"
 
     def test_metaclass_conflict(self):
         """
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to