diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index a26a1e28f49..e40e0034860 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -760,6 +760,9 @@ class D(C): verify(d.goo(1) == (D, 1)) verify(d.foo(1) == (d, 1)) verify(D.foo(d, 1) == (d, 1)) + class E: # *not* subclassing from C + foo = C.foo + verify(E().foo == C.foo) # i.e., unbound def compattr(): if verbose: print "Testing computed attributes..." @@ -901,6 +904,9 @@ class D(C): verify(d2.foo() == 2) verify(d2.boo() == 2) verify(d2.goo() == 1) + class E(object): + foo = C.foo + verify(E().foo == C.foo) # i.e., unbound def specials(): # Test operators like __hash__ for which a built-in default exists