-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathtest_mode.py
More file actions
31 lines (27 loc) · 1.08 KB
/
Copy pathtest_mode.py
File metadata and controls
31 lines (27 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from feast.transformation.mode import TransformationMode
class TestTransformationMode:
def test_all_modes_defined(self):
expected = {
"PYTHON",
"PANDAS",
"SPARK_SQL",
"SPARK",
"FLINK",
"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.FLINK.value == "flink"
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