Martin Panter added the comment:
If I remove the value == 'None' check, there are two failures in the test suite:
1. test_decimal fails, but only because the test was changed in revision
5f3dd0a2b1ab to accommodate the very bug I am complaining about. IMO this was a
case of “fixing” the test instead of fixing the bug, so it is okay to restore
the test.
2. The following test, added in revision ecaafc32c500:
def test_without_exception(self):
err = traceback.format_exception_only(None, None)
self.assertEqual(err, ['None\n'])
It was apparently added so that print_exc() would output “None” when called
with no exception set. This is the case for Python 2. However in the Python 3
versions I have tried, print_exc() either raises AttributeError or prints
“NoneType”. In any case, the test does not seem to be testing anything valid
according to the documentation, so I propose to remove it.
----------
keywords: +patch
nosy: +rbcollins
stage: -> patch review
Added file: http://bugs.python.org/file43577/none-message.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27348>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com