History

Merge branch 'master' into dct

Paul Brossier committed 9 years ago

Commit bfbfafa2 parents 7b7a58e 25db68c29 files · +605 −192Browse files

Showing the changes to python (2 of 29 files). Show all

Unified · Split

2 files
  1. python/ext/py-cvec.c +4 −4
  2. python/tests/test_aubio_cmd.py +5 −1
python/ext/py-cvec.c+4−4
@@ -142,14 +142,14 @@ Py_cvec_set_norm (Py_cvec * vec, PyObject *input, void * closure) · 141 unmodified lines
142142 {
143143 npy_intp length;
144144 if (!PyAubio_IsValidVector(input)) {
145− return 1;
145+ return -1;
146146 }
147147 length = PyArray_SIZE ((PyArrayObject *)input);
148148 if (length != vec->length) {
149149 PyErr_Format (PyExc_ValueError,
150150 "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length,
151151 vec->length);
152− return 1;
152+ return -1;
153153 }
154154
155155 Py_XDECREF(vec->norm);
@@ -163,14 +163,14 @@ Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure) · 7 unmodified lines
163163 {
164164 npy_intp length;
165165 if (!PyAubio_IsValidVector(input)) {
166− return 1;
166+ return -1;
167167 }
168168 length = PyArray_SIZE ((PyArrayObject *)input);
169169 if (length != vec->length) {
170170 PyErr_Format (PyExc_ValueError,
171171 "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length,
172172 vec->length);
173− return 1;
173+ return -1;
174174 }
175175
176176 Py_XDECREF(vec->phas);
python/tests/test_aubio_cmd.py+5−1
@@ -10,7 +10,11 @@ class aubio_cmd(TestCase): · 9 unmodified lines
1010 self.a_parser = aubio.cmd.aubio_parser()
1111
1212 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)
1418
1519 class aubio_cmd_utils(TestCase):
1620

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t