diff --git a/src/python.rs b/src/python.rs index 2cc8585..daa4259 100644 --- a/src/python.rs +++ b/src/python.rs @@ -272,7 +272,7 @@ impl Taxonomy { py_try!(newick::save( &mut bytes, &self.tax, - Some(TaxonomyTrait::::root(&self.tax)) + Some(TaxonomyTrait::<&str>::root(&self.tax)) )); Ok(PyBytes::new(py, &bytes).into()) } diff --git a/test_python.py b/test_python.py index 034a71f..1a2a1cf 100644 --- a/test_python.py +++ b/test_python.py @@ -278,6 +278,12 @@ def test_can_clone(self): self.assertIsNotNone(tax2.node("E")) self.assertEqual(len(tax2), 6) + def test_output_uses_tax_ids(self): + res = self.tax.to_newick().decode("utf-8") + + for tax_id in ["A", "B", "C", "D", "E", "F"]: + assert tax_id in res + class NCBITestCase(unittest.TestCase): def _create_tax(self):