test(ingest): add test names and IDs using pytest (#2476)

This commit is contained in:
Harshal Sheth 2021-04-29 23:18:55 -07:00 committed by GitHub
parent f7b855a087
commit e48a74b80a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# Published at https://pypi.org/project/acryl-datahub/.
__package_name__ = "acryl-datahub"
__version__ = "0.0.0.dev0"

View File

@ -138,7 +138,7 @@ def test_hook_airflow_ui(hook):
@pytest.mark.parametrize(
"inlets,outlets",
["inlets", "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")
def test_lineage_backend(mock_emit, inlets, outlets):

View File

@ -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_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):
fields = avro_schema_to_mce_fields(schema)