Hi, On Tue, Sep 6, 2011 at 11:08 AM, victor.stinner <python-check...@python.org>wrote:
> http://hg.python.org/cpython/rev/786668a4fb6b > changeset: 72301:786668a4fb6b > user: Victor Stinner <vstin...@wyplay.com> > date: Tue Sep 06 10:08:28 2011 +0200 > summary: > Issue #12567: Fix curses.unget_wch() tests > > Skip the test if the function is missing. Use U+0061 (a) instead of U+00E9 > (é) > because U+00E9 raises a _curses.error('unget_wch() returned ERR') on some > buildbots. It's maybe because of the locale encoding. > > files: > Lib/test/test_curses.py | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > > diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py > --- a/Lib/test/test_curses.py > +++ b/Lib/test/test_curses.py > @@ -265,14 +265,16 @@ > stdscr.getkey() > > def test_unget_wch(stdscr): > - ch = '\xe9' > + if not hasattr(curses, 'unget_wch'): > + return > This should be a skip, not a bare return. > + ch = 'a' > curses.unget_wch(ch) > read = stdscr.get_wch() > read = chr(read) > if read != ch: > raise AssertionError("%r != %r" % (read, ch)) > Why not just assertEqual? > > - ch = ord('\xe9') > + ch = ord('a') > curses.unget_wch(ch) > read = stdscr.get_wch() > if read != ch: > > > Best Regards, Ezio Melotti
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com