mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
|
@ -124,7 +124,7 @@ class DistributionTestCase(support.LoggingSilencer,
|
|||
finally:
|
||||
warnings.warn = old_warn
|
||||
|
||||
self.assertEquals(len(warns), 0)
|
||||
self.assertEqual(len(warns), 0)
|
||||
|
||||
def test_finalize_options(self):
|
||||
|
||||
|
|
@ -135,20 +135,20 @@ class DistributionTestCase(support.LoggingSilencer,
|
|||
dist.finalize_options()
|
||||
|
||||
# finalize_option splits platforms and keywords
|
||||
self.assertEquals(dist.metadata.platforms, ['one', 'two'])
|
||||
self.assertEquals(dist.metadata.keywords, ['one', 'two'])
|
||||
self.assertEqual(dist.metadata.platforms, ['one', 'two'])
|
||||
self.assertEqual(dist.metadata.keywords, ['one', 'two'])
|
||||
|
||||
def test_get_command_packages(self):
|
||||
dist = Distribution()
|
||||
self.assertEquals(dist.command_packages, None)
|
||||
self.assertEqual(dist.command_packages, None)
|
||||
cmds = dist.get_command_packages()
|
||||
self.assertEquals(cmds, ['distutils.command'])
|
||||
self.assertEquals(dist.command_packages,
|
||||
['distutils.command'])
|
||||
self.assertEqual(cmds, ['distutils.command'])
|
||||
self.assertEqual(dist.command_packages,
|
||||
['distutils.command'])
|
||||
|
||||
dist.command_packages = 'one,two'
|
||||
cmds = dist.get_command_packages()
|
||||
self.assertEquals(cmds, ['distutils.command', 'one', 'two'])
|
||||
self.assertEqual(cmds, ['distutils.command', 'one', 'two'])
|
||||
|
||||
|
||||
def test_announce(self):
|
||||
|
|
@ -287,8 +287,8 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
|
|||
def test_fix_help_options(self):
|
||||
help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)]
|
||||
fancy_options = fix_help_options(help_tuples)
|
||||
self.assertEquals(fancy_options[0], ('a', 'b', 'c'))
|
||||
self.assertEquals(fancy_options[1], (1, 2, 3))
|
||||
self.assertEqual(fancy_options[0], ('a', 'b', 'c'))
|
||||
self.assertEqual(fancy_options[1], (1, 2, 3))
|
||||
|
||||
def test_show_help(self):
|
||||
# smoke test, just makes sure some help is displayed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue