Exemplo n.º 1
0
 def test_create_feature(self):
     col = pd.Series([1] * 3, dtype='int32', name="test")
     expected = Feature(name="test",
                        entity="test",
                        owner="person",
                        value_type=ValueType.INT32)
     actual = _create_feature(col, "test", "person", None, None)
     assert actual.id == expected.id
     assert actual.value_type == expected.value_type
     assert actual.owner == expected.owner
Exemplo n.º 2
0
 def test_create_feature_with_stores(self):
     col = pd.Series([1] * 3, dtype='int32', name="test")
     expected = Feature(name="test",
                        entity="test",
                        owner="person",
                        value_type=ValueType.INT32,
                        serving_store=Datastore(id="SERVING"),
                        warehouse_store=Datastore(id="WAREHOUSE"))
     actual = _create_feature(col, "test", "person",
                              Datastore(id="SERVING"),
                              Datastore(id="WAREHOUSE"))
     assert actual.id == expected.id
     assert actual.value_type == expected.value_type
     assert actual.owner == expected.owner
     assert actual.serving_store == expected.serving_store
     assert actual.warehouse_store == expected.warehouse_store