diff --git a/smoke-test/requirements.txt b/smoke-test/requirements.txt index 3d827da7d949a..c5d43163dff5d 100644 --- a/smoke-test/requirements.txt +++ b/smoke-test/requirements.txt @@ -7,18 +7,12 @@ slack-sdk==3.18.1 aiohttp joblib pytest-xdist -<<<<<<< HEAD networkx -======= # libaries for linting below this ->>>>>>> 3989f4d73d8 (more linting) black==23.7.0 isort==5.12.0 mypy==1.5.1 ruff==0.0.287 -<<<<<<< HEAD -======= # stub version are copied from metadata-ingestion/setup.py and that should be the source of truth types-requests>=2.28.11.6,<=2.31.0.3 types-PyYAML ->>>>>>> 3989f4d73d8 (more linting) diff --git a/smoke-test/tests/lineage/test_lineage.py b/smoke-test/tests/lineage/test_lineage.py index 52d61d666c7d9..8e1fa5ad98ed9 100644 --- a/smoke-test/tests/lineage/test_lineage.py +++ b/smoke-test/tests/lineage/test_lineage.py @@ -49,6 +49,7 @@ from datahub.utilities.urns.dataset_urn import DatasetUrn from datahub.utilities.urns.urn import Urn from pydantic import BaseModel, validator + from tests.utils import ingest_file_via_rest, wait_for_writes_to_sync logger = logging.getLogger(__name__) @@ -85,7 +86,6 @@ def ingest_tableau_cll_via_rest(wait_for_healthchecks) -> None: ingest_file_via_rest( "tests/lineage/tableau_cll_mcps.json", ) - yield def search_across_lineage( @@ -499,6 +499,7 @@ def get_lineage_mcps(self) -> Iterable[MetadataChangeProposalWrapper]: def get_lineage_mcps_for_hop( self, hop_index: int ) -> Iterable[MetadataChangeProposalWrapper]: + assert self.expectations is not None if self.lineage_style == Scenario.LineageStyle.DATASET_JOB_DATASET: fine_grained_lineage = FineGrainedLineage( upstreamType=FineGrainedLineageUpstreamType.FIELD_SET, @@ -723,10 +724,12 @@ def cleanup(self, delete_agent: DeleteAgent) -> None: delete_agent.delete_entity(urn) def generate_expectation(self, query: ImpactQuery) -> LineageExpectation: + assert self.expectations is not None return self.expectations.generate_query_expectation_pairs(query) def test_expectation(self, graph: DataHubGraph) -> bool: print("Testing expectation...") + assert self.expectations is not None try: for hop_index in range(self.num_hops): for dataset_urn in self.get_upstream_dataset_urns(hop_index):