File tree Expand file tree Collapse file tree 3 files changed +29
-7
lines changed
Expand file tree Collapse file tree 3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,9 @@ benchmark-python-local:
6363 FEAST_USAGE=False IS_TEST=True FEAST_IS_LOCAL_TEST=True python -m pytest --integration --benchmark --benchmark-autosave --benchmark-save-data sdk/python/tests
6464
6565test-python :
66- @ (docker info > /dev/null 2>&1 && \
67- FEAST_USAGE=False \
68- IS_TEST=True \
69- python -m pytest -n 8 sdk/python/tests \
70- ) || echo " This script uses Docker, and it isn't running - please start the Docker Daemon and try again!" ;
66+ FEAST_USAGE=False \
67+ IS_TEST=True \
68+ python -m pytest -n 8 sdk/python/tests \
7169
7270test-python-integration :
7371 FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration sdk/python/tests
Original file line number Diff line number Diff line change @@ -760,7 +760,7 @@ def __init__(
760760
761761 def __eq__ (self , other ):
762762 if not isinstance (other , PushSource ):
763- raise TypeError ( "Comparisons should only involve PushSource class objects." )
763+ return False
764764
765765 if not super ().__eq__ (other ):
766766 return False
Original file line number Diff line number Diff line change 11import pandas as pd
22
3- from feast import Field
3+ from feast import Field , PushSource
44from feast .diff .registry_diff import (
55 diff_registry_objects ,
66 tag_objects_for_keep_delete_update_add ,
@@ -145,3 +145,27 @@ def post_changed(inputs: pd.DataFrame) -> pd.DataFrame:
145145 feast_object_diffs .feast_object_property_diffs [2 ].property_name
146146 == "user_defined_function.body_text"
147147 )
148+
149+
150+ def test_diff_registry_objects_batch_to_push_source (simple_dataset_1 ):
151+ with prep_file_source (df = simple_dataset_1 , timestamp_field = "ts_1" ) as file_source :
152+ entity = Entity (name = "id" , join_keys = ["id" ])
153+ pre_changed = FeatureView (
154+ name = "fv2" ,
155+ entities = [entity ],
156+ source = file_source ,
157+ )
158+ post_changed = FeatureView (
159+ name = "fv2" ,
160+ entities = [entity ],
161+ source = PushSource (name = "push_source" , batch_source = file_source ),
162+ )
163+
164+ feast_object_diffs = diff_registry_objects (
165+ pre_changed , post_changed , "feature view"
166+ )
167+ assert len (feast_object_diffs .feast_object_property_diffs ) == 1
168+ assert (
169+ feast_object_diffs .feast_object_property_diffs [0 ].property_name
170+ == "stream_source"
171+ )
You can’t perform that action at this time.
0 commit comments