Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

individual tests should skip instead of failing if external apps not present #3

Open
nieder opened this issue Jul 13, 2013 · 2 comments
Milestone

Comments

@nieder
Copy link

nieder commented Jul 13, 2013

When running the tests, the entire test suite reports failure if a single test fails because an external dep (clustalw, mafft, uclust, etc) is not installed. Individual tests should first check if the required app is found, and only then execute. Otherwise, that specific test should be skipped.

@ghost ghost assigned gregcaporaso Oct 18, 2013
@gregcaporaso
Copy link
Contributor

PyNAST currently depends on Python 2.6, and conditional unit testing is only available in Python 2.7 and later. Going to delay this for now, as I don't want to change the dependency to 2.7 just for this.

@nieder
Copy link
Author

nieder commented Dec 11, 2013

Python is not yet my thing, but this was passed on to me by another member of the Fink team. Maybe it's helpful:

py27's unittest is available on py26 using unittest2-py26. Using it requires "import unittest2 as unittest"
http://www.voidspace.org.uk/python/articles/unittest2.shtml#test-skipping

And this snippet should make it work on all python versions:
try:
    import unittest2 as unittest
except ImportError:
    import unittest

@gregcaporaso gregcaporaso removed their assignment Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants