[Biopython-dev] [Bug 2524] New: Handle missing libraries like TextTools in run_tests.py
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Fri Jun 20 06:07:59 EDT 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2524
Summary: Handle missing libraries like TextTools in run_tests.py
Product: Biopython
Version: Not Applicable
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Documentation
AssignedTo: biopython-dev at biopython.org
ReportedBy: biopython-bugzilla at maubp.freeserve.co.uk
Once upon a time, we treated any ImportError from a unit test as a reason to
skip the test gracefully, as these are *usually* from missing external
dependencies. This could hide real errors if we had (re)moved a Biopython
module.
We now use the Bio.MissingExternalDependencyError exception, and the unit tests
themselve will raise this for missing command line tools or certain optional
libraries like MySQLdb.
However, the Bio.MissingExternalDependencyError exception does not get raised
when the following commonly used external dependencies are missing:
import TextTools
import Numeric
import reportlab
It is now possible to install Biopython without TextTools and reportlab (and
Numeric?), and make use of a lot of its functionality - but the unit tests give
nasty error messages.
I propose we either:
(a) Add a special case to run_tests.py to catch specific ImportError cases and
skip the test with a suitable message (patch to follow). Specifically
TextTools, reportlab and Numeric - but potentially other third party libraries
like MySQLdb could be handled too. This keeps the individual unit tests
simple.
or:
(b) Modify all the tests using these semi-optional libraries to catch the
ImportError and raise MissingExternalDependencyError instead. As the tests
themselves generally don't directly import the external library this is perhaps
messy.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list