mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-20 07:07:59 +00:00
test(ingest): add test names and IDs using pytest (#2476)
This commit is contained in:
parent
f7b855a087
commit
e48a74b80a
@ -1,3 +1,4 @@
|
|||||||
|
# Published at https://pypi.org/project/acryl-datahub/.
|
||||||
__package_name__ = "acryl-datahub"
|
__package_name__ = "acryl-datahub"
|
||||||
__version__ = "0.0.0.dev0"
|
__version__ = "0.0.0.dev0"
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ def test_hook_airflow_ui(hook):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"inlets,outlets",
|
["inlets", "outlets"],
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
# Airflow 1.10.x uses a dictionary structure for inlets and outlets.
|
# Airflow 1.10.x uses a dictionary structure for inlets and outlets.
|
||||||
@ -158,6 +158,10 @@ def test_hook_airflow_ui(hook):
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
ids=[
|
||||||
|
"airflow-1-10-x-decl",
|
||||||
|
"airflow-2-x-decl",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
@mock.patch("datahub.integrations.airflow.operators.DatahubRestHook.emit_mces")
|
@mock.patch("datahub.integrations.airflow.operators.DatahubRestHook.emit_mces")
|
||||||
def test_lineage_backend(mock_emit, inlets, outlets):
|
def test_lineage_backend(mock_emit, inlets, outlets):
|
||||||
|
@ -114,6 +114,11 @@ SCHEMA_WITH_DEFAULT_VALUE = """
|
|||||||
SCHEMA_WITH_OPTIONAL_FIELD_VIA_UNION_TYPE_NULL_ISNT_FIRST_IN_UNION,
|
SCHEMA_WITH_OPTIONAL_FIELD_VIA_UNION_TYPE_NULL_ISNT_FIRST_IN_UNION,
|
||||||
SCHEMA_WITH_OPTIONAL_FIELD_VIA_PRIMITIVE_TYPE,
|
SCHEMA_WITH_OPTIONAL_FIELD_VIA_PRIMITIVE_TYPE,
|
||||||
],
|
],
|
||||||
|
ids=[
|
||||||
|
"optional_field_via_union_type",
|
||||||
|
"optional_field_via_union_null_not_first",
|
||||||
|
"optional_field_via_primitive",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
def test_avro_schema_to_mce_fields_events_with_nullable_fields(schema):
|
def test_avro_schema_to_mce_fields_events_with_nullable_fields(schema):
|
||||||
fields = avro_schema_to_mce_fields(schema)
|
fields = avro_schema_to_mce_fields(schema)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user