def test_remove_label_raises_error_if_label_not_in_matcher( matcher: RegexMatcher, ) -> None: """It raises a ValueError if trying to remove a label not present.""" with pytest.raises(ValueError): matcher.remove("TEST")
def test_remove_label(matcher: RegexMatcher) -> None: """It removes a label from the matcher.""" matcher.add("TEST", ["test"]) assert "TEST" in matcher matcher.remove("TEST") assert "TEST" not in matcher