Skip to content

Commit 6f78987

Browse files
author
Rémi Lapeyre
committed
Add tests for conflicting kwargs in ast contructors
1 parent 65f64b1 commit 6f78987

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_ast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ def test_classattrs(self):
355355

356356
self.assertRaises(TypeError, ast.Num, 1, None, 2)
357357
self.assertRaises(TypeError, ast.Num, 1, None, 2, lineno=0)
358+
self.assertRaises(TypeError, ast.Num, 1, n=2)
359+
self.assertRaises(TypeError, ast.Constant, 1, value=2)
358360

359361
self.assertEqual(ast.Num(42).n, 42)
360362
self.assertEqual(ast.Num(4.25).n, 4.25)

0 commit comments

Comments
 (0)