Hi, I have two questions related to tests in scikit-image: 1) is there a way to run just a specific test file, as "make test" runs all tests? I tried: python skimage/feature/tests/test_peak.py but it dies with "NameError: name 'version' is not defined" 2) What about using conditional skips for tests in skimage/viewer/tests otherwise these tests fail with "cannot connect to X server" if we are using ssh without -X? StackOverflow suggests checking os.environ['DISPLAY'] (http://stackoverflow.com/questions/12122671/how-to-determine-from-a-python-a...) Kind regards, Kevin
Hi Kevin, regarding your first question, you can use nose: nosetests skimage/feature/tests/test_peak.py Cheers, Emmanuelle On Sun, Jan 25, 2015 at 12:14:02AM +0000, Kevin Keraudren wrote:
Hi,
I have two questions related to tests in scikit-image:
1) is there a way to run just a specific test file, as "make test" runs all tests? I tried: python skimage/feature/tests/test_peak.py but it dies with "NameError: name 'version' is not defined"
2) What about using conditional skips for tests in skimage/viewer/tests otherwise these tests fail with "cannot connect to X server" if we are using ssh without -X? StackOverflow suggests checking os.environ['DISPLAY'] (http://stackoverflow.com/questions/12122671/how-to-determine-from-a-python-a...)
Kind regards,
Kevin
Thanks, it will save me some time the next time I need to focus on a specific test! Cheers, Kevin Le 25/01/2015 14:27, Emmanuelle Gouillart a écrit :
Hi Kevin,
regarding your first question, you can use nose:
nosetests skimage/feature/tests/test_peak.py
Cheers, Emmanuelle
On Sun, Jan 25, 2015 at 12:14:02AM +0000, Kevin Keraudren wrote:
Hi, I have two questions related to tests in scikit-image: 1) is there a way to run just a specific test file, as "make test" runs all tests? I tried: python skimage/feature/tests/test_peak.py but it dies with "NameError: name 'version' is not defined" 2) What about using conditional skips for tests in skimage/viewer/tests otherwise these tests fail with "cannot connect to X server" if we are using ssh without -X? StackOverflow suggests checking os.environ['DISPLAY'] (http://stackoverflow.com/questions/12122671/how-to-determine-from-a-python-a...) Kind regards, Kevin
participants (2)
-
Emmanuelle Gouillart
-
Kevin Keraudren