Add test for features helpers.
@@ -4,3 +4,14 @@ from networkml.featurizers.features import Features
def test_no_func():
instance = Features()
instance.run_func('none')
+
+
+def test_get_columns():
+ instance = Features()
+ assert instance.get_columns(['foo', 'bar'], [{'foo': 1, 'baz': 3}]) == [{'foo': 1}]
+
+
+def test_stat_row_field():
+ instance = Features()
+ assert instance._stat_row_field(max, 'notthere', [{'foo': 1, 'baz': 3}]) == 0
+ assert instance._stat_row_field(max, 'foo', [{'foo': 1, 'baz': 3}, {'foo': 99, 'baz': 3}]) == 99
