def run_and_assert(
        self, project, expected_results: Set[TestResult], expect_pass: bool = False
    ) -> None:
        """
        Run `dbt test` and assert the results are the expected results

        Args:
            project: the `project` fixture; needed since we invoke `run_dbt`
            expected_results: the expected results of the tests as instances of TestResult
            expect_pass: passed directly into `run_dbt`; this is only needed if all expected results are tests that pass

        Returns:
            the row count as an integer
        """
        # run the tests
        results = run_dbt(["test"], expect_pass=expect_pass)

        # show that the statuses are what we expect
        actual = {(result.node.name, result.status) for result in results}
        expected = {(result.name, result.status) for result in expected_results}
        assert actual == expected

        # show that the results are persisted in the correct database objects
        check_relation_types(
            project.adapter, {result.name: result.type for result in expected_results}
        )

        Run `dbt test` and assert the results are the expected results

        Args:
            project: the `project` fixture; needed since we invoke `run_dbt`
            expected_results: the expected results of the tests as instances of TestResult
            expect_pass: passed directly into `run_dbt`; this is only needed if all expected results are tests that pass

        Returns:
            the row count as an integer
        
tests/functional/adapter/store_test_failures_tests/basic.py