Python twisted.trial.unittest 模块,main() 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用twisted.trial.unittest.main()

项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def test_importMain(self):
        """Trying to import __main__"""
        self.client.setZero()
        self.p.perspective_do("import __main__")
        if self.client.getMessages():
            msg = self.client.getMessages()[0]
            if msg[0] in ("exception","stderr"):
                self.fail(msg[1])

#if __name__=='__main__':
#    unittest.main()
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def test_importMain(self):
        """Trying to import __main__"""
        self.client.setZero()
        self.p.perspective_do("import __main__")
        if self.client.getMessages():
            msg = self.client.getMessages()[0]
            if msg[0] in ("exception","stderr"):
                self.fail(msg[1])

#if __name__=='__main__':
#    unittest.main()