Have lldb-mi tests import pexpect at a narrower scope.

The tests are xfail'ed on Windows, but would still error out since
they were importing pexpect at global scope.  This way the tests
will correctly report as unsupported.

llvm-svn: 238249
This commit is contained in:
Zachary Turner 2015-05-26 20:26:43 +00:00
parent 306278ff0d
commit ffc7d6fe6e
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,6 @@ Base class for lldb-mi test cases.
""" """
from lldbtest import * from lldbtest import *
import pexpect
import unittest2 import unittest2
class MiTestCaseBase(Base): class MiTestCaseBase(Base):
@ -32,6 +31,7 @@ class MiTestCaseBase(Base):
Base.tearDown(self) Base.tearDown(self)
def spawnLldbMi(self, args=None): def spawnLldbMi(self, args=None):
import pexpect
self.child = pexpect.spawn("%s --interpreter %s" % ( self.child = pexpect.spawn("%s --interpreter %s" % (
self.lldbMiExec, args if args else "")) self.lldbMiExec, args if args else ""))
self.child.setecho(True) self.child.setecho(True)