comparison tests/test-ui-color.py @ 28915:40afa22bee9b

tests: make test-ui-color use absolute_import
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 14 Apr 2016 00:56:08 +0530
parents 2e5be704bc96
children d83ca854fa21
comparison
equal deleted inserted replaced
28914:63fe5ddb8715 28915:40afa22bee9b
1 from __future__ import print_function 1 from __future__ import absolute_import, print_function
2
2 import os 3 import os
3 from hgext import color 4 from hgext import (
4 from mercurial import dispatch, ui 5 color,
6 )
7 from mercurial import (
8 dispatch,
9 ui as uimod,
10 )
5 11
6 # ensure errors aren't buffered 12 # ensure errors aren't buffered
7 testui = color.colorui() 13 testui = color.colorui()
8 testui.pushbuffer() 14 testui.pushbuffer()
9 testui.write(('buffered\n')) 15 testui.write(('buffered\n'))
15 hgrc = open(os.environ["HGRCPATH"], 'w') 21 hgrc = open(os.environ["HGRCPATH"], 'w')
16 hgrc.write('[extensions]\n') 22 hgrc.write('[extensions]\n')
17 hgrc.write('color=\n') 23 hgrc.write('color=\n')
18 hgrc.close() 24 hgrc.close()
19 25
20 ui_ = ui.ui() 26 ui_ = uimod.ui()
21 ui_.setconfig('ui', 'formatted', 'True') 27 ui_.setconfig('ui', 'formatted', 'True')
22 28
23 # we're not interested in the output, so write that to devnull 29 # we're not interested in the output, so write that to devnull
24 ui_.fout = open(os.devnull, 'w') 30 ui_.fout = open(os.devnull, 'w')
25 31