[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)

Turn deprecation warnings added in 3.8 into TypeError.
This commit is contained in:
Serhiy Storchaka 2019-06-05 18:22:31 +03:00 committed by GitHub
parent 6c01ebcc0d
commit 142566c028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 45 additions and 330 deletions

View file

@ -603,9 +603,9 @@ class TestBaseExitStack:
stack.callback(arg=1)
with self.assertRaises(TypeError):
self.exit_stack.callback(arg=2)
with self.assertWarns(DeprecationWarning):
with self.assertRaises(TypeError):
stack.callback(callback=_exit, arg=3)
self.assertEqual(result, [((), {'arg': 3})])
self.assertEqual(result, [])
def test_push(self):
exc_raised = ZeroDivisionError