Ejemplo n.º 1
0
 def test_set_relative_freqs(self):
     persample_copy = deepcopy(self.persample)
     self.persample['freq'] = None
     for node in traverse(self.persample):
         node['freq'] = None
     set_relative_freqs(self.persample)
     self.assertEqual(persample_copy, self.persample)
Ejemplo n.º 2
0
 def test_set_relative_freqs(self):
     persample_copy = deepcopy(self.persample)
     self.persample['freq'] = None
     for node in traverse(self.persample):
         node['freq'] = None
     set_relative_freqs(self.persample)
     self.assertEqual(persample_copy, self.persample)
Ejemplo n.º 3
0
 def test_traverse(self):
     t = update_tree(None, tax_strings_by_sample)
     exp = ['c__1','c__2','p__x','c__3','p__y','k__1','root']
     obs = [n['name'] for n in traverse(t)]
     self.assertEqual(obs, exp)
Ejemplo n.º 4
0
 def test_traverse(self):
     t = update_tree(None, tax_strings_by_sample)
     exp = ['c__1', 'c__2', 'p__x', 'c__3', 'p__y', 'k__1', 'root']
     obs = [n['name'] for n in traverse(t)]
     self.assertEqual(obs, exp)