Showing the changes to python (2 of 29 files). Show all
Unified · Split
| @@ -142,14 +142,14 @@ Py_cvec_set_norm (Py_cvec * vec, PyObject *input, void * closure) · 141 unmodified lines | ||
| 142 | 142 | { |
| 143 | 143 | npy_intp length; |
| 144 | 144 | if (!PyAubio_IsValidVector(input)) { |
| 145 | − return 1; | |
| 145 | + return -1; | |
| 146 | 146 | } |
| 147 | 147 | length = PyArray_SIZE ((PyArrayObject *)input); |
| 148 | 148 | if (length != vec->length) { |
| 149 | 149 | PyErr_Format (PyExc_ValueError, |
| 150 | 150 | "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length, |
| 151 | 151 | vec->length); |
| 152 | − return 1; | |
| 152 | + return -1; | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | Py_XDECREF(vec->norm); |
| @@ -163,14 +163,14 @@ Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure) · 7 unmodified lines | ||
| 163 | 163 | { |
| 164 | 164 | npy_intp length; |
| 165 | 165 | if (!PyAubio_IsValidVector(input)) { |
| 166 | − return 1; | |
| 166 | + return -1; | |
| 167 | 167 | } |
| 168 | 168 | length = PyArray_SIZE ((PyArrayObject *)input); |
| 169 | 169 | if (length != vec->length) { |
| 170 | 170 | PyErr_Format (PyExc_ValueError, |
| 171 | 171 | "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length, |
| 172 | 172 | vec->length); |
| 173 | − return 1; | |
| 173 | + return -1; | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | Py_XDECREF(vec->phas); |
| @@ -10,7 +10,11 @@ class aubio_cmd(TestCase): · 9 unmodified lines | ||
| 10 | 10 | self.a_parser = aubio.cmd.aubio_parser() |
| 11 | 11 | |
| 12 | 12 | def test_default_creation(self): |
| 13 | − assert self.a_parser.parse_args(['-V']).show_version | |
| 13 | + try: | |
| 14 | + assert self.a_parser.parse_args(['-V']).show_version | |
| 15 | + except SystemExit: | |
| 16 | + url = 'https://bugs.python.org/issue9253' | |
| 17 | + self.skipTest('subcommand became optional in py3, see %s' % url) | |
| 14 | 18 | |
| 15 | 19 | class aubio_cmd_utils(TestCase): |
| 16 | 20 | |