Mercurial > python-hglib
diff tests/test_summary.py @ 221:a2afbf236ca8
hglib tests: remove deprecated constructions
This mostly removes usage of 'assertEquals' (replaced with 'assertEqual'),
as well as opening files without closing them
(fixed using a 'with' statement).
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Thu, 09 Mar 2023 14:00:02 +0100 |
parents | 8341f2494b3f |
children |
line wrap: on
line diff
--- a/tests/test_summary.py Thu Mar 09 11:33:04 2023 +0100 +++ b/tests/test_summary.py Thu Mar 09 14:00:02 2023 +0100 @@ -10,7 +10,7 @@ b('commit') : True, b('update') : 0} - self.assertEquals(self.client.summary(), d) + self.assertEqual(self.client.summary(), d) def test_basic(self): self.append('a', 'a') @@ -23,7 +23,7 @@ if self.client.version >= (3, 5): d[b('phases')] = b('1 draft') - self.assertEquals(self.client.summary(), d) + self.assertEqual(self.client.summary(), d) def test_commit_dirty(self): self.append('a', 'a') @@ -37,7 +37,7 @@ if self.client.version >= (3, 5): d[b('phases')] = b('1 draft') - self.assertEquals(self.client.summary(), d) + self.assertEqual(self.client.summary(), d) def test_secret_commit_clean(self): if self.client.version < (2, 1): @@ -62,7 +62,7 @@ if self.client.version >= (3, 5): d[b('phases')] = b('2 draft') - self.assertEquals(self.client.summary(), d) + self.assertEqual(self.client.summary(), d) def test_remote(self): self.append('a', 'a') @@ -77,17 +77,17 @@ b('update') : 0, b('remote') : (0, 0, 0, 0)} - self.assertEquals(other.summary(remote=True), d) + self.assertEqual(other.summary(remote=True), d) self.append('a', 'a') self.client.commit(b('second')) d[b('remote')] = (1, 0, 0, 0) - self.assertEquals(other.summary(remote=True), d) + self.assertEqual(other.summary(remote=True), d) self.client.bookmark(b('bm')) d[b('remote')] = (1, 1, 0, 0) - self.assertEquals(other.summary(remote=True), d) + self.assertEqual(other.summary(remote=True), d) other.bookmark(b('bmother')) d[b('remote')] = (1, 1, 0, 1) @@ -95,7 +95,7 @@ d[b('parent')] = [(0, node[:12], b('tip bmother'), b('first'))] else: d[b('bookmarks')] = b('*bmother') - self.assertEquals(other.summary(remote=True), d) + self.assertEqual(other.summary(remote=True), d) self.append('other/a', 'a') rev, node = other.commit(b('second in other')) @@ -109,7 +109,7 @@ if self.client.version >= (3, 5): d[b('phases')] = b('1 draft') - self.assertEquals(other.summary(remote=True), d) + self.assertEqual(other.summary(remote=True), d) def test_two_parents(self): self.append('a', 'a') @@ -132,4 +132,4 @@ if self.client.version >= (3, 5): d[b('phases')] = b('3 draft') - self.assertEquals(self.client.summary(), d) + self.assertEqual(self.client.summary(), d)