Output more info when the test fails.

This commit is contained in:
Thomas Heller 2006-03-30 17:49:55 +00:00
parent 314861c568
commit b320682577
1 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,11 @@ class LoaderTest(unittest.TestCase):
else:
name = "libc.so.6"
## print (sys.platform, os.name)
cdll.load(name)
name = "impossible.so"
try:
cdll.load(name)
except Exception, details:
self.fail((str(details), name, (os.name, sys.platform)))
self.assertRaises(OSError, cdll.load, self.unknowndll)
def test_load_version(self):