def test_run_randomise_sample2(self): nex = NexusReader(os.path.join(EXAMPLE_DIR, 'example-translated.trees')) new_nex = run_random(2, nex) assert new_nex.trees.ntrees == len(new_nex.trees.trees) == 2
def test_run_randomise_sample_toobig(self): # raises ValueError, sample size too big (only 3 trees in this file) nex = NexusReader(self.filename) with self.assertRaises(ValueError): run_random(10, nex)
def test_run_randomise_sample2(self): nex = NexusReader(self.filename) new_nex = run_random(2, nex) assert new_nex.trees.ntrees == len(new_nex.trees.trees) == 2