Message228685
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() |
|
Date |
User |
Action |
Args |
2014-10-06 14:06:46 | Yoav.Caspi | set | recipients:
+ Yoav.Caspi |
2014-10-06 14:06:46 | Yoav.Caspi | set | messageid: <1412604406.09.0.877786474305.issue22567@psf.upfronthosting.co.za> |
2014-10-06 14:06:46 | Yoav.Caspi | link | issue22567 messages |
2014-10-06 14:06:45 | Yoav.Caspi | create | |
|