1 # Copyright (C) 2003 Python Software Foundation
4 from test
import test_support
6 # Skip this test if aetools does not exist.
7 test_support
.import_module('aetools')
9 class TestScriptpackages(unittest
.TestCase
):
11 def _test_scriptpackage(self
, package
, testobject
=1):
12 # Check that we can import the package
13 mod
= __import__(package
)
14 # Test that we can get the main event class
15 klass
= getattr(mod
, package
)
16 # Test that we can instantiate that class
19 # Test that we can get an application object
20 obj
= mod
.application(0)
22 def test__builtinSuites(self
):
23 self
._test
_scriptpackage
('_builtinSuites', testobject
=0)
25 def test_StdSuites(self
):
26 self
._test
_scriptpackage
('StdSuites')
28 def test_SystemEvents(self
):
29 self
._test
_scriptpackage
('SystemEvents')
31 def test_Finder(self
):
32 self
._test
_scriptpackage
('Finder')
34 def test_Terminal(self
):
35 self
._test
_scriptpackage
('Terminal')
37 def test_Netscape(self
):
38 self
._test
_scriptpackage
('Netscape')
40 def test_Explorer(self
):
41 self
._test
_scriptpackage
('Explorer')
43 def test_CodeWarrior(self
):
44 self
._test
_scriptpackage
('CodeWarrior')
47 test_support
.run_unittest(TestScriptpackages
)
50 if __name__
== '__main__':