[Python-Dev] [Python-checkins] r68547 - in python/trunk/Lib/test: test_datetime.py test_os.py

Mark Dickinson dickinsm at gmail.com
Thu Jan 15 16:43:44 CET 2009


On Thu, Jan 15, 2009 at 9:13 AM, Kristján Valur Jónsson
<kristjan at ccpgames.com> wrote:
> However, these:
>
> ======================================================================
> ERROR: test_ftruncate (test.test_os.TestInvalidFD)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_os.py", line 570, in test_ftruncate
>    self.assertRaises(OSError, os.ftruncate, 10, 0)
>  File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/unittest.py", line 345, in failUnlessRaises
>    callableObj(*args, **kwargs)
> IOError: [Errno 9] Bad file descriptor

At the risk of stating the obvious, shouldn't you be checking for
IOError rather than OSError in assertRaises?

Mark


More information about the Python-Dev mailing list