Commit 4e7abb42 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

Bug report and partial patch from Michael Deegan <michael@ucc.gu.uwa.edu.au>:

reversed tests resulted in an exception when you supplied the correct number
of arguments
parent 2886f5c6
...@@ -1437,7 +1437,7 @@ PyCurses_color_pair(PyObject *self, PyObject *args) ...@@ -1437,7 +1437,7 @@ PyCurses_color_pair(PyObject *self, PyObject *args)
PyCursesInitialised PyCursesInitialised
PyCursesInitialisedColor PyCursesInitialisedColor
if (ARG_COUNT(args)!=1) { if (ARG_COUNT(args) != 1) {
PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument"); PyErr_SetString(PyExc_TypeError, "color_pair requires 1 argument");
return NULL; return NULL;
} }
...@@ -1452,7 +1452,7 @@ PyCurses_Curs_Set(PyObject *self, PyObject *args) ...@@ -1452,7 +1452,7 @@ PyCurses_Curs_Set(PyObject *self, PyObject *args)
PyCursesInitialised PyCursesInitialised
if (ARG_COUNT(args)==1) { if (ARG_COUNT(args)!=1) {
PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument"); PyErr_SetString(PyExc_TypeError, "curs_set requires 1 argument");
return NULL; return NULL;
} }
...@@ -1472,7 +1472,7 @@ PyCurses_Delay_Output(PyObject *self, PyObject *args) ...@@ -1472,7 +1472,7 @@ PyCurses_Delay_Output(PyObject *self, PyObject *args)
PyCursesInitialised PyCursesInitialised
if (ARG_COUNT(args)==1) { if (ARG_COUNT(args) != 1) {
PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument"); PyErr_SetString(PyExc_TypeError, "delay_output requires 1 argument");
return NULL; return NULL;
} }
...@@ -1637,7 +1637,7 @@ PyCurses_Init_Pair(PyObject *self, PyObject *args) ...@@ -1637,7 +1637,7 @@ PyCurses_Init_Pair(PyObject *self, PyObject *args)
PyCursesInitialised PyCursesInitialised
PyCursesInitialisedColor PyCursesInitialisedColor
if (ARG_COUNT(args) == 3) { if (ARG_COUNT(args) != 3) {
PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments"); PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment