Mercurial > public > mercurial-scm > hg-stable
view tests/test-ui-color.py @ 11732:386e56ecfb78 stable
color: call correct superclass method in write_err
Without this fix, any calls to write_err would go to stdout instead of
stderr, and calls during pushbuffer would cause unpack ValueErrors on
popbuffer.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Mon, 02 Aug 2010 10:48:31 -0400 |
parents | |
children | 4c50552fc9bc |
line wrap: on
line source
#!/usr/bin/env python from hgext import color # ensure errors aren't buffered testui = color.colorui() testui.pushbuffer() testui.write('buffered\n') testui.warn('warning\n') testui.write_err('error\n') print repr(testui.popbuffer())