unittest basics

Chris Withers chris at simplistix.co.uk
Tue May 11 08:40:35 EDT 2010


import unittest

class MyTestCase(unittest.TestCase):

   def test_my_import(self):
     import blah

cheers,

Chris

John Maclean wrote:
> is there a way to test that a certian library or module is or can be 
> loaded successfully?
> 
> self.assert('import blah')
> 

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the Python-list mailing list