# Copyright (C) 2003 Python Software Foundationimport unittestfrom test import test_supportimport aetoolsclass TestScriptpackages(unittest.TestCase):def _test_scriptpackage(self, package, testobject=1):# Check that we can import the packagemod = __import__(package)# Test that we can get the main event classklass = getattr(mod, package)# Test that we can instantiate that classtalker = klass()if testobject:# Test that we can get an application objectobj = mod.application(0)def test__builtinSuites(self):self._test_scriptpackage('_builtinSuites', testobject=0)def test_StdSuites(self):self._test_scriptpackage('StdSuites')def test_SystemEvents(self):self._test_scriptpackage('SystemEvents')def test_Finder(self):self._test_scriptpackage('Finder')def test_Terminal(self):self._test_scriptpackage('Terminal')def test_Netscape(self):self._test_scriptpackage('Netscape')def test_Explorer(self):self._test_scriptpackage('Explorer')def test_CodeWarrior(self):self._test_scriptpackage('CodeWarrior')def test_main():test_support.run_unittest(TestScriptpackages)if __name__ == '__main__':test_main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。