Exemplo n.º 1
0
 def test_individual_metadata(self):
     md = pyslim.IndividualMetadata(
             age=2, pedigree_id=23, population=0,
             sex=pyslim.INDIVIDUAL_TYPE_MALE,
             flags=pyslim.INDIVIDUAL_FLAG_MIGRATED)
     md_bytes = pyslim.encode_individual(md)
     new_md = pyslim.decode_individual(md_bytes)
     self.assertEqual(md, new_md)
Exemplo n.º 2
0
 def test_decode_already_individual(self):
     m = pyslim.IndividualMetadata(pedigree_id=24,
                                   age=8,
                                   population=1,
                                   sex=1,
                                   flags=0)
     dm = pyslim.decode_individual(m)
     self.assertEqual(m, dm)