def test_core_citation_tracker(self):
        """Test the core CitationTracker class functionality."""
        tracker = CitationTracker()

        # Test initial state
        assert len(tracker.processed_spans) == 0, "Should start with empty citation spans"

        # Test adding a new span
        assert tracker.is_new_span("abc1234", (10, 20)), "First span should be considered new"
        assert "abc1234" in tracker.processed_spans, "Citation ID should be in processed_spans"
        assert (10, 20) in tracker.processed_spans["abc1234"], "Span should be recorded"

        # Test adding a duplicate span
        assert not tracker.is_new_span("abc1234", (10, 20)), "Duplicate span should not be considered new"
        assert len(tracker.processed_spans["abc1234"]) == 1, "Duplicate span should not be added again"

        # Test adding a new span for the same citation
        assert tracker.is_new_span("abc1234", (30, 40)), "Different span for same citation should be new"
        assert len(tracker.processed_spans["abc1234"]) == 2, "New span should be added"
        assert (30, 40) in tracker.processed_spans["abc1234"], "New span should be recorded"

        # Test get_all_spans
        all_spans = tracker.get_all_citation_spans()
        assert "abc1234" in all_spans, "Citation ID should be in all spans"
        assert len(all_spans["abc1234"]) == 2, "Should have 2 spans for the citation"
Test the core CitationTracker class functionality.
py/tests/unit/retrieval/test_citations.py