Back to index

python-biopython  1.60
Public Member Functions
test_Entrez.ESpellTest Class Reference

List of all members.

Public Member Functions

def test_espell

Detailed Description

Tests for parsing XML output returned by ESpell

Definition at line 3750 of file test_Entrez.py.


Member Function Documentation

Test parsing XML output returned by ESpell

Definition at line 3753 of file test_Entrez.py.

03753 
03754     def test_espell(self):
03755         '''Test parsing XML output returned by ESpell
03756         '''
03757         # Request suggestions for the PubMed search biopythooon
03758         # To create the XML file, use
03759         # >>> Bio.Entrez.espell(db="pubmed", term="biopythooon")
03760         handle = open('Entrez/espell.xml', "rb")
03761         record = Entrez.read(handle)
03762         handle.close()
03763         self.assertEqual(record["Database"], "pubmed")
03764         self.assertEqual(record["Query"], "biopythooon")
03765         self.assertEqual(record["CorrectedQuery"], "biopython")
03766         self.assertEqual(len(record["SpelledQuery"]), 1)
03767         self.assertEqual(record["SpelledQuery"][0], "biopython")
03768         self.assertEqual(record["SpelledQuery"][0].tag, "Replaced")
03769 

Here is the call graph for this function:


The documentation for this class was generated from the following file: