Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make Jython DTD parsing check specific (in case they fix this)

  • Loading branch information...
commit fff50874931434d54bdaaccd600e19a5c626c5c6 1 parent 7577b22
@peterjc peterjc authored
Showing with 14 additions and 10 deletions.
  1. +7 −5 Tests/test_Entrez.py
  2. +7 −5 Tests/test_Entrez_online.py
View
12 Tests/test_Entrez.py
@@ -5,11 +5,13 @@
import os
if os.name == 'java':
- from Bio import MissingExternalDependencyError
- #This is a slight miss-use of MissingExternalDependencyError,
- #but it will do in the short term to skip this unit test on Jython
- raise MissingExternalDependencyError("The Bio.Entrez XML parser fails "
- "on Jython, see http://bugs.jython.org/issue1447")
+ try:
+ from xml.parsers.expat import XML_PARAM_ENTITY_PARSING_ALWAYS
+ del XML_PARAM_ENTITY_PARSING_ALWAYS
+ except ImportError:
+ from Bio import MissingPythonDependencyError
+ raise MissingPythonDependencyError("The Bio.Entrez XML parser fails on "
+ "Jython, see http://bugs.jython.org/issue1447")
try:
View
12 Tests/test_Entrez_online.py
@@ -23,11 +23,13 @@
from Bio.SeqRecord import SeqRecord
if os.name == 'java':
- from Bio import MissingExternalDependencyError
- #This is a slight miss-use of MissingExternalDependencyError,
- #but it will do in the short term to skip this unit test on Jython
- raise MissingExternalDependencyError("The Bio.Entrez XML parser fails "
- "on Jython, see http://bugs.jython.org/issue1447")
+ try:
+ from xml.parsers.expat import XML_PARAM_ENTITY_PARSING_ALWAYS
+ del XML_PARAM_ENTITY_PARSING_ALWAYS
+ except ImportError:
+ from Bio import MissingPythonDependencyError
+ raise MissingPythonDependencyError("The Bio.Entrez XML parser fails on "
+ "Jython, see http://bugs.jython.org/issue1447")
#This lets us set the email address to be sent to NCBI Entrez:
Please sign in to comment.
Something went wrong with that request. Please try again.