From: Mark Dickinson <dickinsm@gmail.com>
Date: Fri, 13 Aug 2010 07:57:29 +0000 (+0000)
Subject: Issue #8433: Fix test_curses failure caused by newer versions of
X-Git-Tag: v2.6.6rc2~9
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa6a939d3324dc039d58b64234556529eec155b4;p=python

Issue #8433: Fix test_curses failure caused by newer versions of
ncurses returning ERR from getmouse() when there are no mouse events
available.
---

diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index bbc73a99b9..54c310e1ee 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -216,8 +216,8 @@ def module_funcs(stdscr):
         if availmask != 0:
             curses.mouseinterval(10)
             # just verify these don't cause errors
+            curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
             m = curses.getmouse()
-            curses.ungetmouse(*m)
 
     if hasattr(curses, 'is_term_resized'):
         curses.is_term_resized(*stdscr.getmaxyx())
diff --git a/Misc/NEWS b/Misc/NEWS
index fe60cbbe9f..ec1256a426 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -23,6 +23,13 @@ Extension Modules
 
 - Issue #7567: Don't call `setupterm' twice.
 
+Tests
+-----
+
+- Issue #8433: Fix test_curses failure caused by newer versions of
+  ncurses returning ERR from getmouse() when there are no mouse
+  events available.
+
 
 What's New in Python 2.6.6 rc 1?
 ================================