1 # Copyright (C) 2003 Python Software Foundation
7 from test
import test_support
10 class TestScriptpackages(unittest
.TestCase
):
12 def _test_scriptpackage(self
, package
, testobject
=1):
13 # Check that we can import the package
14 mod
= __import__(package
)
15 # Test that we can get the main event class
16 klass
= getattr(mod
, package
)
17 # Test that we can instantiate that class
20 # Test that we can get an application object
21 obj
= mod
.application(0)
23 def test__builtinSuites(self
):
24 self
._test
_scriptpackage
('_builtinSuites', testobject
=0)
26 def test_StdSuites(self
):
27 self
._test
_scriptpackage
('StdSuites')
29 def test_SystemEvents(self
):
30 self
._test
_scriptpackage
('SystemEvents')
32 def test_Finder(self
):
33 self
._test
_scriptpackage
('Finder')
35 def test_Terminal(self
):
36 self
._test
_scriptpackage
('Terminal')
38 def test_Netscape(self
):
39 self
._test
_scriptpackage
('Netscape')
41 def test_Explorer(self
):
42 self
._test
_scriptpackage
('Explorer')
44 def test_CodeWarrior(self
):
45 self
._test
_scriptpackage
('CodeWarrior')
48 test_support
.run_unittest(TestScriptpackages
)
51 if __name__
== '__main__':