def spawn_pytest(self, string, expect_timeout=10.0):
        """Run py.test using pexpect.

        This makes sure to use the right py.test and sets up the
        temporary directory locations.

        The pexpect child is returned.

        """
        basetemp = self.tmpdir.mkdir("pexpect")
        invoke = " ".join(map(str, self._getpytestargs()))
        cmd = "%s --basetemp=%s %s" % (invoke, basetemp, string)
        return self.spawn(cmd, expect_timeout=expect_timeout)
dataset/ETHPy150Open pytest-dev/pytest/_pytest/pytester.py/Testdir.spawn_pytest/original