def test_citation_extraction_cases(self, test_case):
        """Test citation extraction with various edge cases."""
        text = test_case["text"]
        expected = test_case["expected_citations"]

        # Extract citations
        actual = extract_citations(text)

        # Check count
        assert len(actual) == len(expected), f"Expected {len(expected)} citations, got {len(actual)}"

        # Check content (allowing for different orders)
        if expected:
            for expected_citation in expected:
                assert expected_citation in actual, f"Expected citation {expected_citation} not found"
Test citation extraction with various edge cases.
py/tests/unit/agent/test_agent_citations_old.py