From df79f96e47490dedbcb676f77c426fad14df1c6f Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 20 Nov 2010 19:04:17 +0000 Subject: #9424: Replace deprecated assert* methods in the Python test suite. --- tests/test_dist.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/test_dist.py') diff --git a/tests/test_dist.py b/tests/test_dist.py index a8eb8b1d..a20d6c8f 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -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 -- cgit v1.2.1