27 lines
849 B
Python
27 lines
849 B
Python
from band_aider.judgement.contextual_file_render_history import (
|
|
ContextualFileRenderHistory,
|
|
)
|
|
|
|
|
|
def test_history_is_process_wide_and_counts_locations_independently() -> None:
|
|
"""Verify one process registry independently counts normalized locations."""
|
|
|
|
history = ContextualFileRenderHistory.get()
|
|
history.reset()
|
|
|
|
assert history.record("src/one.py") == 1
|
|
assert history.record("src/one.py") == 2
|
|
assert history.record("src/two.py") == 1
|
|
assert history.count("src/one.py") == 2
|
|
assert history.count("src/two.py") == 1
|
|
assert isinstance(history.counts, dict)
|
|
|
|
|
|
def test_history_reset_isolates_focused_tests() -> None:
|
|
"""Verify reset clears all process-wide counts."""
|
|
|
|
history = ContextualFileRenderHistory.get()
|
|
history.record("src/one.py")
|
|
history.reset()
|
|
|
|
assert history.counts == {}
|