8795f89c88
The test was failing because of two reasons: First, the old code had filename questions in DownloadManager.get and DownloadManager.fetch which were almost identical, thus the part in DownloadManager.get was removed in an earlier commit. All filename asking is now done by DownloadManager.fetch. The good part is code deduplication, the bad part is slightly modified behavior: The new code doesn't wait for a filename to start the download, instead it tries to fill the buffer immediately. This made the test fail because qute:// has no registered handler, so in order for the test to pass now, the "no crash" part is not enough, we also need to expect the "No handler" error. Secondly, and a rather rare (race) condition was the handling of errors in the DownloadItem. If an error occured after the registration of self.on_reply_error as error handler and before the check reply.error() != QNetworkReply.NoError at the end of the function, the error signal would be emitted twice: Once by _die() (called by on_reply_error), and once by the init_reply function directly (in the last if block). This lead to duplicated error messages. This is also explained in a comment in the file (with small "stack traces"). |
||
---|---|---|
.. | ||
end2end | ||
helpers | ||
manual | ||
unit | ||
conftest.py | ||
test_conftest.py |