Barry A. Warsaw added the comment: Okay, this one is quite odd. It's definitely a timing issue.
If I put a `import time; time.sleep(1)` at the beginning of test_retrlines_too_line() -- i.e. first line of the method -- then the test reliably passes. If I put a `print(len(line))` just before the maxline test in FTP.retrlines(), then the test will pass just as reliably. If I put that retrlines() print *after* the maxline test, then it passes sometimes and fails sometimes. When if fails, it's only ready 12 bytes from the `fp.readline()` call. When it passes, it's reading 8193 bytes (thus triggering the expected exception). I really hate to put a sleep in the test to make it pass. Obviously it would be better not to fudge this race condition, but I don't know the code well enough to know where the race is yet. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16038> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com