[Numpy-discussion] Writing successful tests

Matt Pagan matt at pagan.io
Mon Apr 14 19:08:20 EDT 2014


Robert Kern:
> On Mon, Apr 14, 2014 at 5:26 AM,  <matt at pagan.io> wrote:
>> Greetings,
>>
>> I'm working on an additional function for numpy/lib/twodim_base.py. I'm
>> trying to add some tests for the new function, and
>> numpy/lib/tests/test_twodim_base.py seems like the right place for
>> them.
>> My problem is travis-ci tells me my tests are no good.
>>
>> The error message I get on my local machine is:
>>
>> ValueError: no such test method in <class '__main__.TestElementary'>:
>> runTest
> 
> Please copy-and-paste the whole error message. Can you point to your
> code somewhere and the travis-ci results? How are you running the test
> suite? `numpy.test()` is the right way to do so. Do not use
> `unittest.main()` or `python -m unittest ...` to run the numpy test
> suite.
> 

Thanks for telling me the correct way to run tests. This info got me a
more useful error message, which I used to make this commit to my local
fork:
https://github.com/mttp/numpy/commit/480c51b17c608a2cbcca65b8a633dbe1b1654070

Seems to fix the problem.


-- 
Matt Pagan
matt at pagan.io
PGP: 0xE9284418E360583C



More information about the NumPy-Discussion mailing list