comparison tests/test_paths.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
10 f.close() 10 f.close()
11 11
12 # hgrc isn't watched for changes yet, have to reopen 12 # hgrc isn't watched for changes yet, have to reopen
13 self.client = hglib.open() 13 self.client = hglib.open()
14 paths = self.client.paths() 14 paths = self.client.paths()
15 self.assertEquals(len(paths), 1) 15 self.assertEqual(len(paths), 1)
16 self.assertEquals(paths[b('foo')], 16 self.assertEqual(paths[b('foo')],
17 os.path.abspath('bar').encode('latin-1')) 17 os.path.abspath('bar').encode('latin-1'))
18 self.assertEquals(self.client.paths(b('foo')), 18 self.assertEqual(self.client.paths(b('foo')),
19 os.path.abspath('bar').encode('latin-1')) 19 os.path.abspath('bar').encode('latin-1'))