Back to index

python-biopython  1.60
Public Member Functions | Private Member Functions
test_PhyloXML.WriterTests Class Reference

List of all members.

Public Member Functions

def test_apaf
def test_bcl2
def test_made
def test_phylo
def test_dollo

Private Member Functions

def _rewrite_and_call

Detailed Description

Tests for serialization of objects to phyloXML format.

Modifies the globally defined filenames in order to run the other parser
tests on files (re)generated by PhyloXMLIO's own writer.

Definition at line 500 of file test_PhyloXML.py.


Member Function Documentation

def test_PhyloXML.WriterTests._rewrite_and_call (   self,
  orig_fname,
  test_cases 
) [private]
Parse, rewrite and retest a phyloXML example file.

Definition at line 507 of file test_PhyloXML.py.

00507 
00508     def _rewrite_and_call(self, orig_fname, test_cases):
00509         """Parse, rewrite and retest a phyloXML example file."""
00510         infile = open(orig_fname, 'rb')
00511         phx = PhyloXMLIO.read(infile)
00512         infile.close()
00513         outfile = open(DUMMY, 'w+b')
00514         PhyloXMLIO.write(phx, outfile)
00515         outfile.close()
00516         for cls, tests in test_cases:
00517             inst = cls('setUp')
00518             for test in tests:
00519                 getattr(inst, test)()

Here is the call graph for this function:

Here is the caller graph for this function:

Round-trip parsing and serialization of apaf.xml.

Definition at line 520 of file test_PhyloXML.py.

00520 
00521     def test_apaf(self):
00522         """Round-trip parsing and serialization of apaf.xml."""
00523         global EX_APAF
00524         orig_fname = EX_APAF
00525         try:
00526             EX_APAF = DUMMY
00527             self._rewrite_and_call(orig_fname, (
00528                 (ParseTests, [
00529                     'test_read_apaf', 'test_parse_apaf', 'test_shape_apaf']),
00530                 (TreeTests, ['test_DomainArchitecture']),
00531                 ))
00532         finally:
00533             EX_APAF = orig_fname

Here is the call graph for this function:

Round-trip parsing and serialization of bcl_2.xml.

Definition at line 534 of file test_PhyloXML.py.

00534 
00535     def test_bcl2(self):
00536         """Round-trip parsing and serialization of bcl_2.xml."""
00537         global EX_BCL2
00538         orig_fname = EX_BCL2
00539         try:
00540             EX_BCL2 = DUMMY
00541             self._rewrite_and_call(orig_fname, (
00542                 (ParseTests, [
00543                     'test_read_bcl2', 'test_parse_bcl2', 'test_shape_bcl2']),
00544                 (TreeTests, ['test_Confidence']),
00545                 ))
00546         finally:
00547             EX_BCL2 = orig_fname

Here is the call graph for this function:

Round-trip parsing and serialization of o_tol_332_d_dollo.xml.

Definition at line 583 of file test_PhyloXML.py.

00583 
00584     def test_dollo(self):
00585         """Round-trip parsing and serialization of o_tol_332_d_dollo.xml."""
00586         global EX_DOLLO
00587         orig_fname = EX_DOLLO
00588         try:
00589             EX_DOLLO = DUMMY
00590             self._rewrite_and_call(orig_fname, (
00591                 (ParseTests, ['test_read_dollo', 'test_parse_dollo']),
00592                 (TreeTests, ['test_BinaryCharacters']),
00593                 ))
00594         finally:
00595             EX_DOLLO = orig_fname
00596 
00597 
00598 # ---------------------------------------------------------
00599 # Method tests

Here is the call graph for this function:

Round-trip parsing and serialization of made_up.xml.

Definition at line 548 of file test_PhyloXML.py.

00548 
00549     def test_made(self):
00550         """Round-trip parsing and serialization of made_up.xml."""
00551         global EX_MADE
00552         orig_fname = EX_MADE
00553         try:
00554             EX_MADE = DUMMY
00555             self._rewrite_and_call(orig_fname, (
00556                 (ParseTests, ['test_read_made', 'test_parse_made']),
00557                 (TreeTests, ['test_Confidence', 'test_Polygon']),
00558                 ))
00559         finally:
00560             EX_MADE = orig_fname

Here is the call graph for this function:

Round-trip parsing and serialization of phyloxml_examples.xml.

Definition at line 561 of file test_PhyloXML.py.

00561 
00562     def test_phylo(self):
00563         """Round-trip parsing and serialization of phyloxml_examples.xml."""
00564         global EX_PHYLO
00565         orig_fname = EX_PHYLO
00566         try:
00567             EX_PHYLO = DUMMY
00568             self._rewrite_and_call(orig_fname, (
00569                 (ParseTests, [
00570                     'test_read_phylo', 'test_parse_phylo', 'test_shape_phylo']),
00571                 (TreeTests, [
00572                     'test_Phyloxml',   'test_Other',
00573                     'test_Phylogeny',  'test_Clade',
00574                     'test_Annotation', 'test_CladeRelation',
00575                     'test_Date',       'test_Distribution',
00576                     'test_Events',     'test_Property',
00577                     'test_Sequence',   'test_SequenceRelation',
00578                     'test_Taxonomy',   'test_Uri',
00579                     ]),
00580                 ))
00581         finally:
00582             EX_PHYLO = orig_fname

Here is the call graph for this function:


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