Exemplo n.º 1
0
 def test_remove_feature_failure(self):
     with pytest.raises(ValueError):
         fs = FeatureSet("my-feature-set")
         fs.drop(name="my-feature-1")
Exemplo n.º 2
0
 def test_add_remove_features_success(self):
     fs = FeatureSet("my-feature-set")
     fs.add(Feature(name="my-feature-1", dtype=ValueType.INT64))
     fs.add(Feature(name="my-feature-2", dtype=ValueType.INT64))
     fs.drop(name="my-feature-1")
     assert len(fs.features) == 1 and fs.features[0].name == "my-feature-2"