-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathtest_mode.py
More file actions
21 lines (17 loc) · 931 Bytes
/
test_mode.py
File metadata and controls
21 lines (17 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from feast.transformation.mode import TransformationMode
class TestTransformationMode:
def test_all_modes_defined(self):
expected = {"PYTHON", "PANDAS", "SPARK_SQL", "SPARK", "RAY", "SQL", "SUBSTRAIT"}
actual = {m.name for m in TransformationMode}
assert actual == expected
def test_mode_values(self):
assert TransformationMode.PYTHON.value == "python"
assert TransformationMode.PANDAS.value == "pandas"
assert TransformationMode.SPARK_SQL.value == "spark_sql"
assert TransformationMode.SPARK.value == "spark"
assert TransformationMode.RAY.value == "ray"
assert TransformationMode.SQL.value == "sql"
assert TransformationMode.SUBSTRAIT.value == "substrait"
def test_mode_from_value(self):
assert TransformationMode("python") == TransformationMode.PYTHON
assert TransformationMode("pandas") == TransformationMode.PANDAS