Skip to content

Commit aad95cb

Browse files
committed
Update test for current and non-current counts
1 parent ed2ce7b commit aad95cb

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/test_dataset.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,16 @@ def test_dataset_current_records_index_filtering_accurate_records_yielded(
436436
As we yielded records reverse chronologically, the deletes from run-6 (alma:0-alma:9)
437437
"influenced" what records we would see as we continue backwards in time.
438438
"""
439+
# with current_records=False, we get all 25 records from run-5
440+
local_dataset_with_runs.load(current_records=False, source="alma")
441+
df = local_dataset_with_runs.read_dataframe(run_id="run-5")
442+
assert len(df) == 25
443+
444+
# with current_records=True, we only get 15 records from run-5
445+
# because newer run-6 influenced what records are current for older run-5
439446
local_dataset_with_runs.load(current_records=True, source="alma")
440447
df = local_dataset_with_runs.read_dataframe(run_id="run-5")
441-
assert df.action.value_counts().to_dict() == {"index": 15}
448+
assert len(df) == 15
442449
assert list(df.timdex_record_id) == [
443450
"alma:10",
444451
"alma:11",

0 commit comments

Comments
 (0)