Skip to content

Commit 9acb1bb

Browse files
committed
testcheck
1 parent 9efee85 commit 9acb1bb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test-data/unit/lib-stub/abc.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
class ABCMeta: pass
1+
class ABCMeta(type): pass
22
abstractmethod = object()
33
abstractproperty = object()

test-data/unit/semanal-errors.test

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,13 +983,17 @@ class A(Generic[T], Generic[S]): pass \
983983
[out]
984984

985985
[case testInvalidMetaclass]
986-
class A(metaclass=x): pass # E: Name 'x' is not defined
986+
class A(metaclass=x): pass
987987
[out]
988+
main:3: error: Name 'x' is not defined
989+
main:3: error: Invalid metaclass 'x'
988990

989991
[case testInvalidQualifiedMetaclass]
990992
import abc
991-
class A(metaclass=abc.Foo): pass # E: Name 'abc.Foo' is not defined
993+
class A(metaclass=abc.Foo): pass
992994
[out]
995+
main:3: error: Name 'abc.Foo' is not defined
996+
main:3: error: Invalid metaclass 'abc.Foo'
993997

994998
[case testNonClassMetaclass]
995999
def f(): pass

0 commit comments

Comments
 (0)