From: John Maclean on 11 May 2010 07:41 is there a way to test that a certian library or module is or can be loaded successfully? self.assert('import blah') -- John Maclean MSc. (DIC) BSc. (Hons) Linux Systems and Applications 07739 171 531
From: Giampaolo RodolĂ on 11 May 2010 08:03 There's no reason for such a thing. You can just make "import module" in your test and if something goes wrong that will be treated as any other test failure. --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil 2010/5/11 John Maclean <jayeola(a)gmail.com>: > is there a way to test that a certian library or module is or can be loaded > successfully? > > self.assert('import blah') > > -- > John Maclean > MSc. (DIC) BSc. (Hons) > Linux Systems and Applications > 07739 171 531 > -- > http://mail.python.org/mailman/listinfo/python-list >
From: Chris Withers on 11 May 2010 08:40 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
|
Pages: 1 Prev: win32com sql update problem Next: how to import a module for global use in a library package ? |