diff options
author | Guido van Rossum <guido@python.org> | 2001-08-17 13:58:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-17 13:58:31 (GMT) |
commit | 84a79a8d25279645b6b6b536e1f8748723ef1209 (patch) | |
tree | ebdbbb3ac45365fc303f2250120f4d378e3421be | |
parent | f23c41d56a6ae0565619258895a321998328326e (diff) | |
download | cpython-84a79a8d25279645b6b6b536e1f8748723ef1209.zip cpython-84a79a8d25279645b6b6b536e1f8748723ef1209.tar.gz cpython-84a79a8d25279645b6b6b536e1f8748723ef1209.tar.bz2 |
classic(),metods(): add tests to verify that a bound method without a
class has a correct repr().
-rw-r--r-- | Lib/test/test_descr.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index e40e003..361af58 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -763,6 +763,7 @@ def classic(): class E: # *not* subclassing from C foo = C.foo verify(E().foo == C.foo) # i.e., unbound + verify(repr(C.foo.__get__(C())).startswith("<bound method ")) def compattr(): if verbose: print "Testing computed attributes..." @@ -907,6 +908,7 @@ def methods(): class E(object): foo = C.foo verify(E().foo == C.foo) # i.e., unbound + verify(repr(C.foo.__get__(C(1))).startswith("<bound method ")) def specials(): # Test operators like __hash__ for which a built-in default exists |