@@ -230,7 +230,7 @@ def __init__(self, name, bases, namespace, otherarg):
230
230
super ().__init__ (name , bases , namespace )
231
231
232
232
with self .assertRaises (TypeError ):
233
- class MyClass (metaclass = MyMeta , otherarg = 1 ):
233
+ class MyClass2 (metaclass = MyMeta , otherarg = 1 ):
234
234
pass
235
235
236
236
class MyMeta (type ):
@@ -241,10 +241,10 @@ def __init__(self, name, bases, namespace, otherarg):
241
241
super ().__init__ (name , bases , namespace )
242
242
self .otherarg = otherarg
243
243
244
- class MyClass (metaclass = MyMeta , otherarg = 1 ):
244
+ class MyClass3 (metaclass = MyMeta , otherarg = 1 ):
245
245
pass
246
246
247
- self .assertEqual (MyClass .otherarg , 1 )
247
+ self .assertEqual (MyClass3 .otherarg , 1 )
248
248
249
249
def test_errors_changed_pep487 (self ):
250
250
# These tests failed before Python 3.6, PEP 487
@@ -263,10 +263,10 @@ def __new__(cls, name, bases, namespace, otherarg):
263
263
self .otherarg = otherarg
264
264
return self
265
265
266
- class MyClass (metaclass = MyMeta , otherarg = 1 ):
266
+ class MyClass2 (metaclass = MyMeta , otherarg = 1 ):
267
267
pass
268
268
269
- self .assertEqual (MyClass .otherarg , 1 )
269
+ self .assertEqual (MyClass2 .otherarg , 1 )
270
270
271
271
def test_type (self ):
272
272
t = type ('NewClass' , (object ,), {})
0 commit comments