Another comparison patch-up: comparing a type with a dynamic metatype

to one with a static metatype raised an obscure error.
This commit is contained in:
Guido van Rossum 2001-09-24 18:47:40 +00:00
parent 2d879017b3
commit 3d45d8f12e
2 changed files with 9 additions and 1 deletions

View file

@ -921,6 +921,13 @@ def dynamics():
verify(L(3)*2 == 6)
verify(L(3)*L(2) == 6)
# Test comparison of classes with dynamic metaclasses
class dynamicmetaclass(type):
__dynamic__ = 1
class someclass:
__metaclass__ = dynamicmetaclass
verify(someclass != object)
def errors():
if verbose: print "Testing errors..."