{"action":"created","issue":{"url":"https://api.github.com/repos/Tribler/tribler/issues/2046","repository_url":"https://api.github.com/repos/Tribler/tribler","labels_url":"https://api.github.com/repos/Tribler/tribler/issues/2046/labels{/name}","comments_url":"https://api.github.com/repos/Tribler/tribler/issues/2046/comments","events_url":"https://api.github.com/repos/Tribler/tribler/issues/2046/events","html_url":"https://github.com/Tribler/tribler/pull/2046","id":142062929,"number":2046,"title":"Unit tests improvements","user":{"login":"devos50","id":1707075,"avatar_url":"https://avatars.githubusercontent.com/u/1707075?v=3","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Tribler/tribler/labels/WIP","name":"WIP","color":"ab6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Tribler/tribler/milestones/13","html_url":"https://github.com/Tribler/tribler/milestones/V6.6%20WX3","labels_url":"https://api.github.com/repos/Tribler/tribler/milestones/13/labels","id":851033,"number":13,"title":"V6.6 WX3","description":"","creator":{"login":"synctext","id":325224,"avatar_url":"https://avatars.githubusercontent.com/u/325224?v=3","gravatar_id":"","url":"https://api.github.com/users/synctext","html_url":"https://github.com/synctext","followers_url":"https://api.github.com/users/synctext/followers","following_url":"https://api.github.com/users/synctext/following{/other_user}","gists_url":"https://api.github.com/users/synctext/gists{/gist_id}","starred_url":"https://api.github.com/users/synctext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synctext/subscriptions","organizations_url":"https://api.github.com/users/synctext/orgs","repos_url":"https://api.github.com/users/synctext/repos","events_url":"https://api.github.com/users/synctext/events{/privacy}","received_events_url":"https://api.github.com/users/synctext/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":56,"state":"open","created_at":"2014-11-03T11:16:42Z","updated_at":"2016-04-13T11:27:55Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2016-03-19T13:45:00Z","updated_at":"2016-04-13T18:42:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Tribler/tribler/pulls/2046","html_url":"https://github.com/Tribler/tribler/pull/2046","diff_url":"https://github.com/Tribler/tribler/pull/2046.diff","patch_url":"https://github.com/Tribler/tribler/pull/2046.patch"},"body":"This PR contains the following fixes/improvements to the unit tests:\r\n-Some tests gave unexpected results when running on Windows so I had to fix them.\r\n-Cleaned up `win32regchecker.py` by removing unused methods and written a test for it. When the new GUI goes live, this class (together with all video player utilities) can be removed.\r\n-When closing, sometimes a stack trace would show. This only happens in the yield methods during shutdown which might sometimes take a while to execute. When during this period, the wx watchdog event is not set, watchdog trips. To prevent this from happening, I unregister the wx watchdog event earlier.\r\n-Added some tests for the thread pool manager.\r\n-The torrent upgrader classes do not require a session anymore as parameter. This makes it easier to unit test the upgrader.\r\n-Written tests for the torrent upgrade process from Tribler 6.3 -> 6.4 and 6.4 -> 6.5. I also written test to test `upgrade.py`, the class that is responsible for the whole upgrade process. I've covered all files regarding upgrading for more than 90% so I think the upgrade process is currently well-tested.\r\n-Written a local HTTP file server, used to serve torrents in the tests. This should be used instead of external network URLs since they might be unreliable. I've rewritten some tests to make use of this local HTTP server.\r\n\r\nFixes #1729, fixes #2044, fixes #1811, fixes #2022, fixes #1944, fixes #1801, fixes #2081. \r\n\r\nNote: the win32 en win64 unit tests are currently testing this branch. This should be changed as soon this PR is merged into devel.\r\n\r\nNote for @whirm: the diff coverage tools is complaining about uncovered files in the `Tribler.Test` module. This can be explained by the fact that we do not cover `Tribler.Test` during the nosetests (we do not pass the `--cover-tests` option to nose). So the diff tool reports a lower coverage. We can either ignore test coverage in the the tests files or we can pass `--cover-tests` to nosetests so we include coverage of the test files. I prefer the first options since I think it is not very beneficial to also cover the tests files."},"comment":{"url":"https://api.github.com/repos/Tribler/tribler/issues/comments/209589354","html_url":"https://github.com/Tribler/tribler/pull/2046#issuecomment-209589354","issue_url":"https://api.github.com/repos/Tribler/tribler/issues/2046","id":209589354,"user":{"login":"devos50","id":1707075,"avatar_url":"https://avatars.githubusercontent.com/u/1707075?v=3","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T18:42:39Z","updated_at":"2016-04-13T18:42:39Z","body":"Will test a few more times to see whether tests are more stable"}}