comparison tests/test_util.py @ 1001:26aa0172725b

test_util: specify a username in our test-run hgrc.
author Augie Fackler <raf@durin42.com>
date Fri, 12 Apr 2013 16:23:46 -0400
parents 9c3b4f59e7e6
children 6945d3359456
comparison
equal deleted inserted replaced
1000:09b5e6a76724 1001:26aa0172725b
257 self.tmpdir = tempfile.mkdtemp( 257 self.tmpdir = tempfile.mkdtemp(
258 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None)) 258 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None))
259 self.hgrc = os.path.join(self.tmpdir, '.hgrc') 259 self.hgrc = os.path.join(self.tmpdir, '.hgrc')
260 os.environ['HGRCPATH'] = self.hgrc 260 os.environ['HGRCPATH'] = self.hgrc
261 rc = open(self.hgrc, 'w') 261 rc = open(self.hgrc, 'w')
262 rc.write('[ui]\nusername=test-user\n')
262 for l in '[extensions]', 'hgsubversion=': 263 for l in '[extensions]', 'hgsubversion=':
263 print >> rc, l 264 print >> rc, l
264 265
265 self.repocount = 0 266 self.repocount = 0
266 self.wc_path = '%s/testrepo_wc' % self.tmpdir 267 self.wc_path = '%s/testrepo_wc' % self.tmpdir
541 graphlog.graphlog(_ui, repo, rev=None, template=templ) 542 graphlog.graphlog(_ui, repo, rev=None, template=templ)
542 return _ui.popbuffer() 543 return _ui.popbuffer()
543 544
544 def draw(self, repo): 545 def draw(self, repo):
545 sys.stdout.write(self.getgraph(repo)) 546 sys.stdout.write(self.getgraph(repo))
546