comparison tests/test-ui-color.py @ 37942:32bc3815efae

stringutil: flip the default of pprint() to bprefix=False If we use pprint() as a drop-in replacement for repr(), bprefix=False is more appropriate. Let's make it the default to remove bprefix=False noise.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 10 May 2018 21:08:32 +0900
parents b8c2004a8d2b
children 2372284d9457
comparison
equal deleted inserted replaced
37941:af83a0ed0afb 37942:32bc3815efae
13 testui = uimod.ui() 13 testui = uimod.ui()
14 testui.pushbuffer() 14 testui.pushbuffer()
15 testui.write((b'buffered\n')) 15 testui.write((b'buffered\n'))
16 testui.warn((b'warning\n')) 16 testui.warn((b'warning\n'))
17 testui.write_err(b'error\n') 17 testui.write_err(b'error\n')
18 print(stringutil.pprint(testui.popbuffer()).decode('ascii')) 18 print(stringutil.pprint(testui.popbuffer(), bprefix=True).decode('ascii'))
19 19
20 # test dispatch.dispatch with the same ui object 20 # test dispatch.dispatch with the same ui object
21 hgrc = open(os.environ["HGRCPATH"], 'wb') 21 hgrc = open(os.environ["HGRCPATH"], 'wb')
22 hgrc.write(b'[extensions]\n') 22 hgrc.write(b'[extensions]\n')
23 hgrc.write(b'color=\n') 23 hgrc.write(b'color=\n')