Permalink
Browse files

Skip Bio.bgzf doctest if gzip broken http://bugs.python.org/issue17666

  • Loading branch information...
1 parent 975f5c4 commit 6505019bb6e85004e2adee7fad61667c38c76adc @peterjc peterjc committed May 14, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 Tests/run_tests.py
View
@@ -39,6 +39,7 @@
import distutils.util
import gc
+from Bio import MissingExternalDependencyError, MissingPythonDependencyError
def is_pypy():
import platform
@@ -138,6 +139,12 @@ def is_numpy():
if sys.version_info[0] == 3:
DOCTEST_MODULES.remove("Bio.Seq")
+#Skip Bio.bgzf doctest for broken gzip, see http://bugs.python.org/issue17666
+try:
+ from test_bgzf import _have_bug17666
+except MissingPythonDependencyError:
+ DOCTEST_MODULES.remove("Bio.bgzf")
+
#HACK: Since Python2.5 under Windows have slightly different str(float) output,
#we're removing doctests that may fail because of this
if sys.platform == "win32" and sys.version_info < (2,6):
@@ -350,7 +357,6 @@ def __init__(self, tests=[], verbosity=0):
verbosity=verbosity)
def runTest(self, name):
- from Bio import MissingExternalDependencyError
result = self._makeResult()
output = cStringIO.StringIO()
# Restore the language and thus default encoding (in case a prior

0 comments on commit 6505019

Please sign in to comment.