From: John Maclean on
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
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
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