Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test meaningful error message when reading incompletes from non-existent symbol #1991

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions python/tests/unit/arcticdb/version_store/test_incompletes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pandas as pd
import pytest
from arcticdb.util.test import assert_frame_equal
from arcticdb.exceptions import MissingDataException


@pytest.mark.parametrize("batch", (True, False))
Expand Down Expand Up @@ -46,3 +47,16 @@ def test_read_incompletes_no_indexed_data(lmdb_version_store_v1, batch):
received_vit = lib.read(sym, date_range=(df.index[1], df.index[-2]), incomplete=True)
assert received_vit.symbol == sym
assert_frame_equal(df.iloc[1:-1], received_vit.data)


@pytest.mark.parametrize("batch", (True, False))
def test_read_incompletes_non_existent_symbol(lmdb_version_store_v1, batch):
lib = lmdb_version_store_v1
sym = "test_read_incompletes_non_existent_symbol"
# Incomplete reads require a date range
date_range = (pd.Timestamp(0), pd.Timestamp(1))
with pytest.raises(MissingDataException):
if batch:
lib.batch_read([sym], date_ranges=[date_range], incomplete=True)
else:
lib.read(sym, date_range=date_range, incomplete=True)
Loading