[issue19613] test_nntplib: sporadic failures, test_article_head_body()
Martin Panter
report at bugs.python.org
Tue Jun 21 02:07:52 EDT 2016
Martin Panter added the comment:
I presume the original report was due to testing when the server happened to return an article with an empty body. The failing test is
# XXX this could exceptionally happen...
self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n"))
The test code already admits that what it is testing cannot be guaranteed (an article body could end with a full stop). And we have found another case where the test is not valid (an article with zero lines). I say remove this part of the test, at least when testing the article() and body() methods.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19613>
_______________________________________
More information about the Python-bugs-list
mailing list