Skip to content

Commit ca988b9

Browse files
author
Himanshu Singh
committed
fixing unit test error
Signed-off-by: Himanshu Singh <himanshu.singh@walmart.com>
1 parent 009205d commit ca988b9

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

sdk/python/tests/unit/infra/offline_stores/test_bigquery_non_entity_mode.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
BigQueryOfflineStoreConfig,
1919
BigQueryRetrievalJob,
2020
_bq_create_entity_union_table,
21-
_gather_all_entities,
21+
2222
)
23+
from feast.infra.offline_stores.offline_utils import gather_all_entities
2324
from feast.infra.offline_stores.bigquery_source import BigQuerySource
2425
from feast.infra.offline_stores.offline_utils import FeatureViewQueryContext
2526
from feast.infra.online_stores.sqlite import SqliteOnlineStoreConfig
@@ -101,32 +102,32 @@ def _make_feature_view_mock(
101102
class TestGatherAllEntities:
102103
def test_single_feature_view(self):
103104
ctx = _make_fv_context("fv1", ["customer_id", "item_id"])
104-
assert _gather_all_entities([ctx]) == ["customer_id", "item_id"]
105+
assert gather_all_entities([ctx]) == ["customer_id", "item_id"]
105106

106107
def test_multiple_views_overlapping_entities(self):
107108
ctx1 = _make_fv_context("fv1", ["customer_id", "item_id"])
108109
ctx2 = _make_fv_context("fv2", ["customer_id", "store_id"])
109-
result = _gather_all_entities([ctx1, ctx2])
110+
result = gather_all_entities([ctx1, ctx2])
110111
# customer_id should appear only once; order is first-seen
111112
assert result == ["customer_id", "item_id", "store_id"]
112113

113114
def test_multiple_views_disjoint_entities(self):
114115
ctx1 = _make_fv_context("fv1", ["driver_id"])
115116
ctx2 = _make_fv_context("fv2", ["customer_id"])
116-
result = _gather_all_entities([ctx1, ctx2])
117+
result = gather_all_entities([ctx1, ctx2])
117118
assert result == ["driver_id", "customer_id"]
118119

119120
def test_entityless_feature_view(self):
120121
ctx = _make_fv_context("fv1", [])
121-
assert _gather_all_entities([ctx]) == []
122+
assert gather_all_entities([ctx]) == []
122123

123124
def test_empty_list(self):
124-
assert _gather_all_entities([]) == []
125+
assert gather_all_entities([]) == []
125126

126127
def test_preserves_insertion_order(self):
127128
ctx1 = _make_fv_context("fv1", ["z_entity", "a_entity"])
128129
ctx2 = _make_fv_context("fv2", ["a_entity", "m_entity"])
129-
result = _gather_all_entities([ctx1, ctx2])
130+
result = gather_all_entities([ctx1, ctx2])
130131
assert result == ["z_entity", "a_entity", "m_entity"]
131132

132133

0 commit comments

Comments
 (0)