1 """Check that we handle an ImportError in a special way when command script importing files."""
3 from __future__ import print_function
9 from lldbsuite.test.lldbtest import *
11 class Rdar12586188TestCase(TestBase):
13 mydir = TestBase.compute_mydir(__file__)
15 @add_test_categories(['pyapi'])
17 def test_rdar12586188_command(self):
18 """Check that we handle an ImportError in a special way when command script importing files."""
22 # Call super's setUp().
26 """Check that we handle an ImportError in a special way when command script importing files."""
28 self.expect("command script import ./fail12586188.py --allow-reload",
29 error=True, substrs = ['raise ImportError("I do not want to be imported")'])
30 self.expect("command script import ./fail212586188.py --allow-reload",
31 error=True, substrs = ['raise ValueError("I do not want to be imported")'])