Hi,<br><br><div class="gmail_quote">On Tue, Sep 6, 2011 at 11:08 AM, victor.stinner <span dir="ltr">&lt;<a href="mailto:python-checkins@python.org">python-checkins@python.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<a href="http://hg.python.org/cpython/rev/786668a4fb6b" target="_blank">http://hg.python.org/cpython/rev/786668a4fb6b</a><br>
changeset:   72301:786668a4fb6b<br>
user:        Victor Stinner &lt;<a href="mailto:vstinner@wyplay.com">vstinner@wyplay.com</a>&gt;<br>
date:        Tue Sep 06 10:08:28 2011 +0200<br>
summary:<br>
  Issue #12567: Fix curses.unget_wch() tests<br>
<br>
Skip the test if the function is missing. Use U+0061 (a) instead of U+00E9 (é)<br>
because U+00E9 raises a _curses.error(&#39;unget_wch() returned ERR&#39;) on some<br>
buildbots. It&#39;s maybe because of the locale encoding.<br>
<br>
files:<br>
  Lib/test/test_curses.py |  6 ++++--<br>
  1 files changed, 4 insertions(+), 2 deletions(-)<br>
<br>
<br>
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py<br>
--- a/Lib/test/test_curses.py<br>
+++ b/Lib/test/test_curses.py<br>
@@ -265,14 +265,16 @@<br>
     stdscr.getkey()<br>
<br>
 def test_unget_wch(stdscr):<br>
-    ch = &#39;\xe9&#39;<br>
+    if not hasattr(curses, &#39;unget_wch&#39;):<br>
+        return<br></blockquote><div><br>This should be a skip, not a bare return.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

+    ch = &#39;a&#39;<br>
     curses.unget_wch(ch)<br>
     read = stdscr.get_wch()<br>
     read = chr(read)<br>
     if read != ch:<br>
         raise AssertionError(&quot;%r != %r&quot; % (read, ch))<br></blockquote><div><br>Why not just assertEqual?<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
-    ch = ord(&#39;\xe9&#39;)<br>
+    ch = ord(&#39;a&#39;)<br>
     curses.unget_wch(ch)<br>
     read = stdscr.get_wch()<br>
     if read != ch:<br>
<font color="#888888"><br>
</font><br></blockquote><div><br>Best Regards,<br>Ezio Melotti <br></div></div><br>