This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Yoav.Caspi
Recipients Yoav.Caspi
Date 2014-10-06.14:06:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412604406.09.0.877786474305.issue22567@psf.upfronthosting.co.za>
In-reply-to
Content
When implementing a class with a __del__ function that raise an exception the exception ignored.
is it possible to add this printed message to be tested by doc test?

something like when running this script the script will pass:
 
"""
Usage Example:
    >>> cls = Module()
    >>> del cls
    Exception Exception: Exception('oops',) in <bound method Module.__del__ of <__main__.Module object at 0x000000000XXXXXXX>> ignored
"""

class Module(object):
    def __del__(self):
        raise Exception("oops")

if __name__ == '__main__':
    from doctest import testmod
    print testmod()
History
Date User Action Args
2014-10-06 14:06:46Yoav.Caspisetrecipients: + Yoav.Caspi
2014-10-06 14:06:46Yoav.Caspisetmessageid: <1412604406.09.0.877786474305.issue22567@psf.upfronthosting.co.za>
2014-10-06 14:06:46Yoav.Caspilinkissue22567 messages
2014-10-06 14:06:45Yoav.Caspicreate