comparison tests/test_merge.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
comparison
equal deleted inserted replaced
220:ae6427d1c8f7 221:a2afbf236ca8
26 \ No newline at end of file 26 \ No newline at end of file
27 +aa 27 +aa
28 \ No newline at end of file 28 \ No newline at end of file
29 """) 29 """)
30 30
31 self.assertEquals(diff, self.client.diff(change=node, nodates=True)) 31 self.assertEqual(diff, self.client.diff(change=node, nodates=True))
32 32
33 def test_merge_prompt_abort(self): 33 def test_merge_prompt_abort(self):
34 self.client.update(self.node0) 34 self.client.update(self.node0)
35 self.client.remove(b('a')) 35 self.client.remove(b('a'))
36 self.client.commit(b('remove')) 36 self.client.commit(b('remove'))
54 +++ b/a 54 +++ b/a
55 @@ -0,0 +1,1 @@ 55 @@ -0,0 +1,1 @@
56 +aa 56 +aa
57 \ No newline at end of file 57 \ No newline at end of file
58 """) 58 """)
59 self.assertEquals(diff, self.client.diff(nodates=True)) 59 self.assertEqual(diff, self.client.diff(nodates=True))
60 60
61 def test_merge_prompt_cb(self): 61 def test_merge_prompt_cb(self):
62 self.client.update(self.node0) 62 self.client.update(self.node0)
63 self.client.remove(b('a')) 63 self.client.remove(b('a'))
64 rev, node = self.client.commit(b('remove')) 64 rev, node = self.client.commit(b('remove'))
73 +++ b/a 73 +++ b/a
74 @@ -0,0 +1,1 @@ 74 @@ -0,0 +1,1 @@
75 +aa 75 +aa
76 \ No newline at end of file 76 \ No newline at end of file
77 """) 77 """)
78 self.assertEquals(diff, self.client.diff(nodates=True)) 78 self.assertEqual(diff, self.client.diff(nodates=True))