New submission from Yoav Caspi: 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() ---------- components: Tests messages: 228685 nosy: Yoav.Caspi priority: normal severity: normal status: open title: doctest handle ignored execption type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22567> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com