def assert_did_run_setup(self, output, allow_source=True, allow_wheel=True):
        """assert that the output shows that either setup.py was successfully executed or a wheel was installed."""
        if not (("Running setup file" in output and allow_source) or ("Installing wheel:" in output and allow_wheel)):
            raise AssertionError("Output '{o}' does not seem to have installed a wheel or run setup.py!".format(o=output))
        self.assertNotIn("Failed to run setup.py", output)
assert that the output shows that either setup.py was successfully executed or a wheel was installed.
tests/pip/test_pip.py