Discussion:
[SciPy-Dev] Running Tests
ashwin.pathak
2017-03-09 17:29:21 UTC
Permalink
Hello all,
I was learning about nose and test suites, I am not able to figure
out how to run test for particular functions that I changed. Can someone
help me know the procedure as to how to run tests for individual
functions.
Thank you
Paul Hobson
2017-03-09 17:34:09 UTC
Permalink
Ashwin,

I typically do:

<testrunner> path/to/my/test_file.py:test_my_function

where <testrunner> is nosetests or pytest or whatever.

You can read more about that here:
http://stackoverflow.com/questions/3704473/how-do-i-run-a-single-test-with-nose-in-pylons

On Thu, Mar 9, 2017 at 9:29 AM, ashwin.pathak <
Post by ashwin.pathak
Hello all,
I was learning about nose and test suites, I am not able to figure out
how to run test for particular functions that I changed. Can someone help
me know the procedure as to how to run tests for individual functions.
Thank you
_______________________________________________
SciPy-Dev mailing list
https://mail.scipy.org/mailman/listinfo/scipy-dev
Evgeni Burovski
2017-03-09 17:59:15 UTC
Permalink
Post by Paul Hobson
Ashwin,
<testrunner> path/to/my/test_file.py:test_my_function
where <testrunner> is nosetests or pytest or whatever.
http://stackoverflow.com/questions/3704473/how-do-i-run-a-single-test-with-nose-in-pylons
Post by Paul Hobson
On Thu, Mar 9, 2017 at 9:29 AM, ashwin.pathak <
Post by ashwin.pathak
Hello all,
I was learning about nose and test suites, I am not able to figure
out how to run test for particular functions that I changed. Can someone
help me know the procedure as to how to run tests for individual functions.
Post by Paul Hobson
Post by ashwin.pathak
Thank you
What Paul said, or

$ python runtests.py -t path/to/test/file:test_function

or

$ python runtests.py -s submodule

Evgeni

Loading...