summaryrefslogtreecommitdiffstats
path: root/source/stf
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-03-12 07:17:39 +0000
committerMartin Pool <mbp@samba.org>2003-03-12 07:17:39 +0000
commit9b0c59a10707b2bbe3837d718e5030a6cdf19bfa (patch)
treeec9871ff3f499deb4f8d921ccd0bbfc7959f9aed /source/stf
parente84046e769a518fa1970827f4dcb8284ba9b9952 (diff)
downloadsamba-9b0c59a10707b2bbe3837d718e5030a6cdf19bfa.tar.gz
samba-9b0c59a10707b2bbe3837d718e5030a6cdf19bfa.tar.xz
samba-9b0c59a10707b2bbe3837d718e5030a6cdf19bfa.zip
Update for new version of ComfyChair: some methods are renamed to be
more consistent, and it now looks at command-line arguments to work out what to do. Run this program to get a quick demonstration of what ComfyChair does.
Diffstat (limited to 'source/stf')
-rwxr-xr-xsource/stf/test.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/stf/test.py b/source/stf/test.py
index 2e9abd976fa..fb57926cc3a 100755
--- a/source/stf/test.py
+++ b/source/stf/test.py
@@ -3,26 +3,31 @@
# meta-test-case / example for comfychair. Should demonstrate
# different kinds of failure.
-import comfychair, stf
+import comfychair
class NormalTest(comfychair.TestCase):
- def runTest(self):
+ def runtest(self):
pass
class RootTest(comfychair.TestCase):
- def setUp(self):
+ def setup(self):
self.require_root()
def runTest(self):
pass
class GoodExecTest(comfychair.TestCase):
- def runTest(self):
- exit, stdout = self.runCmdUnchecked("ls -l")
+ def runtest(self):
+ stdout = self.runcmd("ls -l")
class BadExecTest(comfychair.TestCase):
- def setUp(self):
- exit, stdout = self.runCmdUnchecked("spottyfoot --slobber",
- skip_on_noexec = 1)
+ def setup(self):
+ exit, stdout = self.runcmd_unchecked("spottyfoot --slobber",
+ skip_on_noexec = 1)
+
+
+tests = [NormalTest, RootTest, GoodExecTest, BadExecTest]
-comfychair.runtests([NormalTest, RootTest, GoodExecTest, BadExecTest])
+if __name__ == '__main__':
+ comfychair.main(tests)
+