mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)
This commit is contained in:
parent
4a686504eb
commit
2085bd0877
34 changed files with 126 additions and 261 deletions
|
@ -410,14 +410,13 @@ class TestModuleCleanUp(unittest.TestCase):
|
|||
|
||||
class Module(object):
|
||||
unittest.addModuleCleanup(cleanup, 1, 2, function='hello')
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
with self.assertRaises(TypeError):
|
||||
unittest.addModuleCleanup(function=cleanup, arg='hello')
|
||||
with self.assertRaises(TypeError):
|
||||
unittest.addModuleCleanup()
|
||||
unittest.case.doModuleCleanups()
|
||||
self.assertEqual(cleanups,
|
||||
[((), {'arg': 'hello'}),
|
||||
((1, 2), {'function': 'hello'})])
|
||||
[((1, 2), {'function': 'hello'})])
|
||||
|
||||
def test_run_module_cleanUp(self):
|
||||
blowUp = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue