1 """Check that we handle an ImportError in a special way when command script importing files."""
3 from __future__ import print_function
10 from lldbsuite.test.decorators import *
11 from lldbsuite.test.lldbtest import *
12 from lldbsuite.test import lldbutil
15 class Rdar12586188TestCase(TestBase):
17 mydir = TestBase.compute_mydir(__file__)
19 @add_test_categories(['pyapi'])
21 def test_rdar12586188_command(self):
22 """Check that we handle an ImportError in a special way when command script importing files."""
26 # Call super's setUp().
30 """Check that we handle an ImportError in a special way when command script importing files."""
33 "command script import ./fail12586188.py --allow-reload",
35 substrs=['raise ImportError("I do not want to be imported")'])
37 "command script import ./fail212586188.py --allow-reload",
39 substrs=['raise ValueError("I do not want to be imported")'])