~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source3/stf/test.py

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
# meta-test-case / example for comfychair.  Should demonstrate
 
4
# different kinds of failure.
 
5
 
 
6
import comfychair
 
7
 
 
8
class NormalTest(comfychair.TestCase):
 
9
    def runtest(self):
 
10
        pass
 
11
 
 
12
class RootTest(comfychair.TestCase):
 
13
    def setup(self):
 
14
        self.require_root()
 
15
            
 
16
    def runTest(self):
 
17
        pass
 
18
 
 
19
class GoodExecTest(comfychair.TestCase):
 
20
    def runtest(self):
 
21
        stdout = self.runcmd("ls -l")
 
22
 
 
23
class BadExecTest(comfychair.TestCase):
 
24
    def setup(self):
 
25
        exit, stdout = self.runcmd_unchecked("spottyfoot --slobber",
 
26
                                             skip_on_noexec = 1)
 
27
 
 
28
 
 
29
tests = [NormalTest, RootTest, GoodExecTest, BadExecTest]
 
30
 
 
31
if __name__ == '__main__':
 
32
    comfychair.main(tests)
 
33