def test_newick_sniffer_invalid_files(self): for invalid, _ in self.invalid_newicks: fh = io.StringIO(invalid) self.assertEqual(_newick_sniffer(fh), (False, {})) fh.close()
def test_newick_sniffer_valid_files(self): for _, newicks in self.trees_newick_lists: for newick in newicks: fh = io.StringIO(newick) self.assertEqual(_newick_sniffer(fh), (True, {})) fh.close()