{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/270","labels_url":"https://api.github.com/repos/Valloric/ycmd/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/ycmd/issues/270/comments","events_url":"https://api.github.com/repos/Valloric/ycmd/issues/270/events","html_url":"https://github.com/Valloric/ycmd/pull/270","id":121709755,"number":270,"title":"Refactoring integration tests","user":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-11T13:41:36Z","updated_at":"2015-12-13T22:17:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Valloric/ycmd/pulls/270","html_url":"https://github.com/Valloric/ycmd/pull/270","diff_url":"https://github.com/Valloric/ycmd/pull/270.diff","patch_url":"https://github.com/Valloric/ycmd/pull/270.patch"},"body":"### Changes\r\n- Move related completer tests to their own subdirectories:\r\n```\r\nycmd\r\n  └── tests        \r\n      ├── clang\r\n      │   ├── testdata\r\n      │   ├── __init__.py\r\n      │   ├── get_completions_test.py\r\n      │   ├── diagnostics_test.py\r\n      │   ├── subcommands_test.py\r\n      │   └── utils.py \r\n      ├── cs ── ... \r\n      ├── python ── ...\r\n      ├── go ── ...\r\n      ...\r\n```\r\n- Regroup tests in classes and subclasses: take advantage of fixtures (`setUp` and `tearDown` methods) and inheritance.\r\n- Rename tests: names are now shorter;\r\n- Fix coding style;\r\n- Update copyright notices;\r\n- No tests were harmed during the making of this PR: 458 tests before, 458 tests after.\r\n\r\n### Issues?\r\n- Code to set the Bottle debug mode:\r\n```python\r\nimport bottle\r\n\r\nbottle.debug( True )\r\n```\r\nwas removed from all tests inheriting from `Handlers_test` where it is set in the `setUp` method. Is it enough to enable debug mode in all tests? I don't know how to check this.\r\n- `Basic_test` and `ZeroBasedLineAndColumn_test` tests in `Cs_Diagnostics_test` are near to be identical. Should we remove one of them?\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/valloric/ycmd/270)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/comments/164303013","html_url":"https://github.com/Valloric/ycmd/pull/270#issuecomment-164303013","issue_url":"https://api.github.com/repos/Valloric/ycmd/issues/270","id":164303013,"user":{"login":"puremourning","id":10584846,"avatar_url":"https://avatars.githubusercontent.com/u/10584846?v=3","gravatar_id":"","url":"https://api.github.com/users/puremourning","html_url":"https://github.com/puremourning","followers_url":"https://api.github.com/users/puremourning/followers","following_url":"https://api.github.com/users/puremourning/following{/other_user}","gists_url":"https://api.github.com/users/puremourning/gists{/gist_id}","starred_url":"https://api.github.com/users/puremourning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puremourning/subscriptions","organizations_url":"https://api.github.com/users/puremourning/orgs","repos_url":"https://api.github.com/users/puremourning/repos","events_url":"https://api.github.com/users/puremourning/events{/privacy}","received_events_url":"https://api.github.com/users/puremourning/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T22:17:38Z","updated_at":"2015-12-13T22:17:38Z","body":"For the second item, i think the limiting factor in the existing tests is the creation of the TestApp, which you're already abstracting, so I hope it should be a matter of only creating that once-per-script rather than once-per-test, using class-level fixtures. From nose docs:\n\n> Class-level setup fixtures may be named setup_class, setupClass, setUpClass, setupAll or setUpAll; teardown fixtures may be named teardown_class, teardownClass, tearDownClass, teardownAll or tearDownAll. Class-level setup and teardown fixtures must be class methods.\n\n---\n\nReviewed 10 of 27 files at r2, 3 of 4 files at r3.\nReview status: 101 of 111 files reviewed at latest revision, 4 unresolved discussions.\n\n---\n\n*[ycmd/tests/clang/diagnostics_test.py, line 76 \\[r1\\]](https://reviewable.io:443/reviews/valloric/ycmd/270#-K5I4MyFpO0Ig_DAdCWG:-K5MPlfMIj8Q6bP-cLtF:-655596896) ([raw file](https://github.com/valloric/ycmd/blob/107e6189f0f6f506898e71172a0db3f7b9d803d5/ycmd/tests/clang/diagnostics_test.py#L76)):*\nI think that's what @vheon means, yeah\n\n---\n\n*[ycmd/tests/handlers_test.py, line 43 \\[r3\\]](https://reviewable.io:443/reviews/valloric/ycmd/270#-K5MQn5hnvlXnx9g9C56:-K5MQn5hnvlXnx9g9C57:1159500833) ([raw file](https://github.com/valloric/ycmd/blob/2fe265e66244eede592c83fbe7852d11e863c89e/ycmd/tests/handlers_test.py#L43)):*\nIt seems strange to me to call static methods via an instance pointer (these are always called via `self.`). I just kinda feel that they were better as module methods where they can be imported and namespaced as required by the user and are somewhat less verbose ::/ \n\n---\n\n\n*Comments from the [review on Reviewable.io](https://reviewable.io:443/reviews/valloric/ycmd/270#-:-K5SPJRonlg8juoEPBsM:-1400647006)*\n<!-- Sent from Reviewable.io -->\n"}}