]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wx/py/tests/test_pseudo.py
little tweaks
[wxWidgets.git] / wxPython / wx / py / tests / test_pseudo.py
CommitLineData
1fded56b
RD
1#!/usr/bin/env python
2
3__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
4__cvsid__ = "$Id$"
5__revision__ = "$Revision$"[11:-2]
6
7import unittest
8
9# Import from this module's parent directory.
10import os
11import sys
12sys.path.insert(0, os.pardir)
13import pseudo
14del sys.path[0]
15del sys
16del os
17
18
19"""
20These unittest methods are preferred:
21-------------------------------------
22self.assert_(expr, msg=None)
23self.assertEqual(first, second, msg=None)
24self.assertRaises(excClass, callableObj, *args, **kwargs)
25self.fail(msg=None)
26self.failIf(expr, msg=None)
27"""
28
29
30class ModuleTestCase(unittest.TestCase):
31
32 def test_module(self):
33 module = pseudo
34 self.assert_(module.__author__)
35 self.assert_(module.__cvsid__)
36 self.assert_(module.__revision__)
37 self.assert_(module.PseudoFile)
38 self.assert_(module.PseudoFileErr)
39 self.assert_(module.PseudoFileIn)
40 self.assert_(module.PseudoFileOut)
41 self.assert_(module.PseudoKeyword)
42
43
44class PseudoTestCase(unittest.TestCase):
45
46 def setUp(self):
47 pass
48
49 def tearDown(self):
50 pass
51
52
53class PseudoFileTestCase(unittest.TestCase):
54
55 def setUp(self):
56 pass
57
58 def tearDown(self):
59 pass
60
61
62class PseudoFileOutTestCase(unittest.TestCase):
63
64 def setUp(self):
65 pass
66
67 def tearDown(self):
68 pass
69
70 def _write(self):
71 pass
72
73 def test_PseudoFileOut_goodInit(self):
74 self.assert_(pseudo.PseudoFileOut(write=self._write))
75
76 def test_PseudoFileOut_badInit(self):
77 self.assertRaises(ValueError, pseudo.PseudoFileOut, write='bad')
78
79
80if __name__ == '__main__':
81 unittest.main()