diff options
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r-- | Lib/test/test_typing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 8d6262b..3a0edb9 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -3626,6 +3626,13 @@ class XMethBad2(NamedTuple): return 'no chance for this as well' """) + def test_multiple_inheritance(self): + class A: + pass + with self.assertRaises(TypeError): + class X(NamedTuple, A): + x: int + def test_namedtuple_keyword_usage(self): LocalEmployee = NamedTuple("LocalEmployee", name=str, age=int) nick = LocalEmployee('Nick', 25) |