def test_get_model(self): """get_models successfully creates model instances""" # just returns query if it's already a substitution model for mod in (CNFGTR(), WG01(), GN()): got = get_model(mod) self.assertEqual(id(got), id(mod)) with self.assertRaises(ValueError): # unknown model raises exception _ = get_model("blah")
def test_empirical_values_roundtrip(self): model = WG01() assert model.get_motif_probs() == WG01_freqs assert (model.calc_exchangeability_matrix("dummy_mprobs") == WG01_matrix).all()
def test_bin_options(self): kwargs = dict(with_rate=True, distribution="gamma") model = WG01(**kwargs) model = GTR(**kwargs)