comparison tests/test-init.py @ 143:4359cabcb0cc

hglib: move string literals in the test code to util.b() (issue4520)
author Brett Cannon <brett@python.org>
date Mon, 09 Mar 2015 18:26:25 -0400
parents 07efbd3bd09a
children c1b966866ed7
comparison
equal deleted inserted replaced
142:fe74d5599539 143:4359cabcb0cc
1 import hglib, common, shutil 1 import hglib, common, shutil
2 from hglib.util import b
2 3
3 class test_init(common.basetest): 4 class test_init(common.basetest):
4 def test_exists(self): 5 def test_exists(self):
5 self.assertRaises(hglib.error.CommandError, hglib.init) 6 self.assertRaises(hglib.error.CommandError, hglib.init)
6 7
8 self.client.close() 9 self.client.close()
9 self.client = None 10 self.client = None
10 shutil.rmtree('.hg') 11 shutil.rmtree('.hg')
11 12
12 self.client = hglib.init().open() 13 self.client = hglib.init().open()
13 self.assertTrue(self.client.root().endswith('test_init')) 14 self.assertTrue(self.client.root().endswith(b('test_init')))