aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py b/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
index 01c3f35bf300..01e7902b0f32 100644
--- a/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
+++ b/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
@@ -3,13 +3,15 @@
from __future__ import print_function
-
-import os, sys, time
+import os
+import sys
+import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class ImportTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -47,29 +49,31 @@ class ImportTestCase(TestBase):
self.runCmd("command script import ./bar/bar.py --allow-reload")
self.expect("command script import ./nosuchfile.py",
- error=True, startstr='error: module importing failed')
+ error=True, startstr='error: module importing failed')
self.expect("command script import ./nosuchfolder/",
- error=True, startstr='error: module importing failed')
+ error=True, startstr='error: module importing failed')
self.expect("command script import ./foo/foo.py", error=False)
self.runCmd("command script import --allow-reload ./thepackage")
- self.expect("TPcommandA",substrs=["hello world A"])
- self.expect("TPcommandB",substrs=["hello world B"])
+ self.expect("TPcommandA", substrs=["hello world A"])
+ self.expect("TPcommandB", substrs=["hello world B"])
self.runCmd("script import dummymodule")
self.expect("command script import ./dummymodule.py", error=False)
- self.expect("command script import --allow-reload ./dummymodule.py", error=False)
+ self.expect(
+ "command script import --allow-reload ./dummymodule.py",
+ error=False)
self.runCmd("command script add -f foo.foo_function foocmd")
self.runCmd("command script add -f foobar.foo_function foobarcmd")
self.runCmd("command script add -f bar.bar_function barcmd")
self.expect("foocmd hello",
- substrs = ['foo says', 'hello'])
+ substrs=['foo says', 'hello'])
self.expect("foo2cmd hello",
- substrs = ['foo2 says', 'hello'])
+ substrs=['foo2 says', 'hello'])
self.expect("barcmd hello",
- substrs = ['barutil says', 'bar told me', 'hello'])
+ substrs=['barutil says', 'bar told me', 'hello'])
self.expect("barothercmd hello",
- substrs = ['barutil says', 'bar told me', 'hello'])
+ substrs=['barutil says', 'bar told me', 'hello'])
self.expect("foobarcmd hello",
- substrs = ['foobar says', 'hello'])
+ substrs=['foobar says', 'hello'])