def _test_read_factory(source, count):
 fname = os.path.basename(source)
 def test_read(self):
  phx = PhyloXMLIO.read(source)
  self.assertTrue(phx)
  self.assertEqual(len(phx), count[0])
  self.assertEqual(len(phx.other), count[1])
 test_read.__doc__ = ('Read %s to produce a phyloXML object.' % fname)
 return test_read

def _test_read_factory ( source , count ) : fname = os . path . basename ( source ) def test_read ( self ) : phx = PhyloXMLIO . read ( source ) self . assertTrue ( phx ) self . assertEqual ( len ( phx ) , count [ 0 ] ) self . assertEqual ( len ( phx . other ) , count [ 1 ] ) test_read . __doc__ = ( 'Read %s to produce a phyloXML object.' % fname ) return test_read
generate a test method for read()ing the given source .