def test_citation_with_punctuation():
    """Test extraction of citations with surrounding punctuation."""
    text = "Citations with punctuation: ([abc1234]), [def5678]!, and [ghi9012]."

    # Extract citations
    citations = extract_citations(text)

    # Check if all citations are extracted correctly
    assert "abc1234" in citations, "Citation abc1234 should be extracted"
    assert "def5678" in citations, "Citation def5678 should be extracted"
    assert "ghi9012" in citations, "Citation ghi9012 should be extracted"
Test extraction of citations with surrounding punctuation.
py/tests/unit/agent/test_agent_citations_old.py