diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
commit | 458120dd40db6b4df55a4e96b650e16798ef06a0 (patch) | |
tree | 8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/lib/python/test/test_scriptpackages.py | |
parent | 3a742c699f6806c1145aea5149bf15de15a0afd7 (diff) |
add hg and python
Diffstat (limited to 'sys/lib/python/test/test_scriptpackages.py')
-rw-r--r-- | sys/lib/python/test/test_scriptpackages.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sys/lib/python/test/test_scriptpackages.py b/sys/lib/python/test/test_scriptpackages.py new file mode 100644 index 000000000..a2e03f91e --- /dev/null +++ b/sys/lib/python/test/test_scriptpackages.py @@ -0,0 +1,52 @@ +# Copyright (C) 2003 Python Software Foundation + +import unittest +import os +import sys +import tempfile +from test import test_support +import aetools + +class TestScriptpackages(unittest.TestCase): + + def _test_scriptpackage(self, package, testobject=1): + # Check that we can import the package + mod = __import__(package) + # Test that we can get the main event class + klass = getattr(mod, package) + # Test that we can instantiate that class + talker = klass() + if testobject: + # Test that we can get an application object + obj = 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() |