test.py

来自「samba-3.0.22.tar.gz 编译smb服务器的源码」· Python 代码 · 共 34 行

PY
34
字号
#!/usr/bin/python# meta-test-case / example for comfychair.  Should demonstrate# different kinds of failure.import comfychairclass NormalTest(comfychair.TestCase):    def runtest(self):        passclass RootTest(comfychair.TestCase):    def setup(self):        self.require_root()                def runTest(self):        passclass GoodExecTest(comfychair.TestCase):    def runtest(self):        stdout = self.runcmd("ls -l")class BadExecTest(comfychair.TestCase):    def setup(self):        exit, stdout = self.runcmd_unchecked("spottyfoot --slobber",                                             skip_on_noexec = 1)tests = [NormalTest, RootTest, GoodExecTest, BadExecTest]if __name__ == '__main__':    comfychair.main(tests)    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?