comparison tests/test_copy.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
6 def test_basic(self): 6 def test_basic(self):
7 self.append('a', 'a') 7 self.append('a', 'a')
8 self.client.commit(b('first'), addremove=True) 8 self.client.commit(b('first'), addremove=True)
9 9
10 self.assertTrue(self.client.copy(b('a'), b('b'))) 10 self.assertTrue(self.client.copy(b('a'), b('b')))
11 self.assertEquals(self.client.status(), [(b('A'), b('b'))]) 11 self.assertEqual(self.client.status(), [(b('A'), b('b'))])
12 self.append('c', 'a') 12 self.append('c', 'a')
13 self.assertTrue(self.client.copy(b('a'), b('c'), after=True)) 13 self.assertTrue(self.client.copy(b('a'), b('c'), after=True))
14 self.assertEquals(self.client.status(), 14 self.assertEqual(self.client.status(),
15 [(b('A'), b('b')), (b('A'), b('c'))]) 15 [(b('A'), b('b')), (b('A'), b('c'))])
16 16
17 # hg returns 0 even if there were warnings 17 # hg returns 0 even if there were warnings
18 #def test_warnings(self): 18 #def test_warnings(self):
19 # self.append('a', 'a') 19 # self.append('a', 'a')