]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/py/tests/test_pseudo.py
3 __author__
= "Patrick K. O'Brien <pobrien@orbtech.com>"
5 __revision__
= "$Revision$"[11:-2]
9 # Import from this module's parent directory.
12 sys
.path
.insert(0, os
.pardir
)
20 These unittest methods are preferred:
21 -------------------------------------
22 self.assert_(expr, msg=None)
23 self.assertEqual(first, second, msg=None)
24 self.assertRaises(excClass, callableObj, *args, **kwargs)
26 self.failIf(expr, msg=None)
30 class ModuleTestCase(unittest
.TestCase
):
32 def test_module(self
):
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
)
44 class PseudoTestCase(unittest
.TestCase
):
53 class PseudoFileTestCase(unittest
.TestCase
):
62 class PseudoFileOutTestCase(unittest
.TestCase
):
73 def test_PseudoFileOut_goodInit(self
):
74 self
.assert_(pseudo
.PseudoFileOut(write
=self
._write
))
76 def test_PseudoFileOut_badInit(self
):
77 self
.assertRaises(ValueError, pseudo
.PseudoFileOut
, write
='bad')
80 if __name__
== '__main__':