def test_get_relative_gene_2(self): """Verify get_relative_gene() returns None when expected.""" rel_geneid = annotation.get_relative_gene(self.alchemist, "Trixie_CDS_1", -1) self.assertEqual(rel_geneid, None)
def test_get_relative_gene_1(self): """Verify get_relative_gene() returns GeneID string as expected.""" rel_geneid = annotation.get_relative_gene(self.alchemist, "Trixie_CDS_2", -1) self.assertEqual(rel_geneid, "Trixie_CDS_1")
def test_get_relative_gene_2(self, mock_select): """Verify get_relative_gene() raises ValueError at bad GeneID input.""" with self.assertRaises(ValueError): annotation.get_relative_gene(self.mock_alchemist, "BAD_GENE", -1)
def test_get_relative_gene_1(self, mock_select): """Verify select() function calls of get_relative_gene().""" annotation.get_relative_gene(self.mock_alchemist, "Trixie_CDS_2", -1) mock_select.assert_any_call([self.geneid_column])
def test_get_relative_gene_3(self): """Verify get_relative_gene() raises ValueError from bad GeneID.""" with self.assertRaises(ValueError): annotation.get_relative_gene(self.alchemist, "NOT A GENE", 8675309)