{"action":"created","comment":{"url":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments/128235931","pull_request_review_id":50895069,"id":128235931,"diff_hunk":"@@ -22,17 +67,107 @@ def setUp(self):\n     def tearDown(self):\n         sys.argv = self.old_argv\n \n-    def test_filter_relevant_bears(self):\n-        res = filter_relevant_bears([('Python', 70), ('C', 20)])\n+    def test_filter_relevant_bears_simple(self):\n+        res = filter_relevant_bears(\n+            [('Python', 70), ('C', 20)],\n+            self.project_dir,\n+            self.printer,\n+            self.arg_parser)\n         self.assertIn(\"C\", res)\n         self.assertIn(\"Python\", res)\n         self.assertTrue(len(res[\"C\"]) > 0)\n         self.assertTrue(len(res[\"Python\"]) > 0)\n \n+    def test_filter_relevant_bears_with_extracted_info(self):\n+        # results without extracted information\n+        languages = [('JavaScript', 70), ('Ruby', 20)]\n+        res_1 = filter_relevant_bears(\n+            languages, self.project_dir, self.printer, self.arg_parser)\n+        for lang, _ in languages:\n+            self.assertIn(lang, res_1)\n+            self.assertTrue(len(res_1[lang]) > 0)\n+\n+        # results with extracted information\n+        res_2 = []\n+        with generate_files([\".editorconfig\", \"package.json\", \"Gemfile\"],\n+                            [editorconfig, package_json, gemfile],\n+                            self.project_dir) as gen_files:\n+            res_2 = filter_relevant_bears(\n+                languages, self.project_dir, self.printer, self.arg_parser)\n+            for lang, _ in languages:\n+                self.assertIn(lang, res_2)\n+                self.assertTrue(len(res_2[lang]) > 0)\n+\n+        # Comparing both the scenarios\n+\n+        # The following dict has list of bears that have their requirements\n+        # caputred by `ProjectDependencyInfo` from the dependency files\n+        # but are not part of the `IMPORTANT_BEARS_LIST` in Constants.py\n+        additional_bears_by_lang = {\n+            \"JavaScript\": [\"ESLintBear\", \"HappinessLintBear\"],\n+            \"Ruby\": [],\n+            \"All\": []\n+        }\n+        for lang in res_1:\n+            additional_bears = [bear.name for bear in res_2[lang]\n+                                if bear not in res_1[lang]]\n+            for bear in additional_bears_by_lang[lang]:\n+                self.assertIn(bear, additional_bears)\n+\n+    def test_filter_relevant_bears_with_non_optional_settings(self):\n+\n+        with bear_test_module():\n+            languages = []\n+            res_1 = filter_relevant_bears(\n+                languages, self.project_dir, self.printer, self.arg_parser)\n+\n+            # results with extracted information\n+            res_2 = []\n+            with generate_files([\".editorconfig\", \"package.json\", \"Gemfile\"],\n+                                [editorconfig, package_json, gemfile],\n+                                self.project_dir):\n+                with simulate_console_inputs(\"Yes\") as generator:\n+                    res_2 = filter_relevant_bears(\n+                        languages, self.project_dir, self.printer, self.arg_parser)","path":"tests/generation/Bears.py","position":null,"original_position":129,"commit_id":"6ffd6719cadc3f920b8f806bd6012575b0a2e02b","original_commit_id":"cce010b6542b8eedc82b0ad28e6cb1760d45e665","user":{"login":"gitmate-bot","id":15421488,"avatar_url":"https://avatars0.githubusercontent.com/u/15421488?v=4","gravatar_id":"","url":"https://api.github.com/users/gitmate-bot","html_url":"https://github.com/gitmate-bot","followers_url":"https://api.github.com/users/gitmate-bot/followers","following_url":"https://api.github.com/users/gitmate-bot/following{/other_user}","gists_url":"https://api.github.com/users/gitmate-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/gitmate-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitmate-bot/subscriptions","organizations_url":"https://api.github.com/users/gitmate-bot/orgs","repos_url":"https://api.github.com/users/gitmate-bot/repos","events_url":"https://api.github.com/users/gitmate-bot/events{/privacy}","received_events_url":"https://api.github.com/users/gitmate-bot/received_events","type":"User","site_admin":false},"body":"E501 line too long (83 > 80 characters)'\n\n*PycodestyleBear (E501), severity NORMAL, section `autopep8`.*","created_at":"2017-07-19T12:52:26Z","updated_at":"2017-07-19T12:52:26Z","html_url":"https://github.com/coala/coala-quickstart/pull/133#discussion_r128235931","pull_request_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments/128235931"},"html":{"href":"https://github.com/coala/coala-quickstart/pull/133#discussion_r128235931"},"pull_request":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133","id":130401144,"html_url":"https://github.com/coala/coala-quickstart/pull/133","diff_url":"https://github.com/coala/coala-quickstart/pull/133.diff","patch_url":"https://github.com/coala/coala-quickstart/pull/133.patch","issue_url":"https://api.github.com/repos/coala/coala-quickstart/issues/133","number":133,"state":"open","locked":false,"title":"cEP-0014 implementation","user":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-13T15:33:12Z","updated_at":"2017-07-19T12:52:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ae038fa3be217f3038590204ec6807e1c8c13fb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/commits","review_comments_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/comments","review_comment_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coala/coala-quickstart/issues/133/comments","statuses_url":"https://api.github.com/repos/coala/coala-quickstart/statuses/6ffd6719cadc3f920b8f806bd6012575b0a2e02b","head":{"label":"satwikkansal:information_utilization","ref":"information_utilization","sha":"6ffd6719cadc3f920b8f806bd6012575b0a2e02b","user":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"repo":{"id":78829581,"name":"coala-quickstart","full_name":"satwikkansal/coala-quickstart","owner":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/satwikkansal/coala-quickstart","description":"A binary that generates an initial coala config lightning fast for you!","fork":true,"url":"https://api.github.com/repos/satwikkansal/coala-quickstart","forks_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/forks","keys_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/teams","hooks_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/hooks","issue_events_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues/events{/number}","events_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/events","assignees_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/assignees{/user}","branches_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/branches{/branch}","tags_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/tags","blobs_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/refs{/sha}","trees_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/statuses/{sha}","languages_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/languages","stargazers_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/stargazers","contributors_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/contributors","subscribers_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/subscribers","subscription_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/subscription","commits_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/commits{/sha}","git_commits_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/commits{/sha}","comments_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/comments{/number}","issue_comment_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues/comments{/number}","contents_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/contents/{+path}","compare_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/merges","archive_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/downloads","issues_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues{/number}","pulls_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/pulls{/number}","milestones_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/milestones{/number}","notifications_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/labels{/name}","releases_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/releases{/id}","deployments_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/deployments","created_at":"2017-01-13T08:18:29Z","updated_at":"2017-01-13T08:18:31Z","pushed_at":"2017-07-19T12:51:14Z","git_url":"git://github.com/satwikkansal/coala-quickstart.git","ssh_url":"git@github.com:satwikkansal/coala-quickstart.git","clone_url":"https://github.com/satwikkansal/coala-quickstart.git","svn_url":"https://github.com/satwikkansal/coala-quickstart","homepage":"","size":142,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coala:master","ref":"master","sha":"7ac90f0812a1c338defb5265e33085fce36c2e7a","user":{"login":"coala","id":10620750,"avatar_url":"https://avatars3.githubusercontent.com/u/10620750?v=4","gravatar_id":"","url":"https://api.github.com/users/coala","html_url":"https://github.com/coala","followers_url":"https://api.github.com/users/coala/followers","following_url":"https://api.github.com/users/coala/following{/other_user}","gists_url":"https://api.github.com/users/coala/gists{/gist_id}","starred_url":"https://api.github.com/users/coala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala/subscriptions","organizations_url":"https://api.github.com/users/coala/orgs","repos_url":"https://api.github.com/users/coala/repos","events_url":"https://api.github.com/users/coala/events{/privacy}","received_events_url":"https://api.github.com/users/coala/received_events","type":"Organization","site_admin":false},"repo":{"id":52889504,"name":"coala-quickstart","full_name":"coala/coala-quickstart","owner":{"login":"coala","id":10620750,"avatar_url":"https://avatars3.githubusercontent.com/u/10620750?v=4","gravatar_id":"","url":"https://api.github.com/users/coala","html_url":"https://github.com/coala","followers_url":"https://api.github.com/users/coala/followers","following_url":"https://api.github.com/users/coala/following{/other_user}","gists_url":"https://api.github.com/users/coala/gists{/gist_id}","starred_url":"https://api.github.com/users/coala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala/subscriptions","organizations_url":"https://api.github.com/users/coala/orgs","repos_url":"https://api.github.com/users/coala/repos","events_url":"https://api.github.com/users/coala/events{/privacy}","received_events_url":"https://api.github.com/users/coala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coala/coala-quickstart","description":"A tool that generates an initial coala config lightning fast for you!","fork":false,"url":"https://api.github.com/repos/coala/coala-quickstart","forks_url":"https://api.github.com/repos/coala/coala-quickstart/forks","keys_url":"https://api.github.com/repos/coala/coala-quickstart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coala/coala-quickstart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coala/coala-quickstart/teams","hooks_url":"https://api.github.com/repos/coala/coala-quickstart/hooks","issue_events_url":"https://api.github.com/repos/coala/coala-quickstart/issues/events{/number}","events_url":"https://api.github.com/repos/coala/coala-quickstart/events","assignees_url":"https://api.github.com/repos/coala/coala-quickstart/assignees{/user}","branches_url":"https://api.github.com/repos/coala/coala-quickstart/branches{/branch}","tags_url":"https://api.github.com/repos/coala/coala-quickstart/tags","blobs_url":"https://api.github.com/repos/coala/coala-quickstart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coala/coala-quickstart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coala/coala-quickstart/git/refs{/sha}","trees_url":"https://api.github.com/repos/coala/coala-quickstart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coala/coala-quickstart/statuses/{sha}","languages_url":"https://api.github.com/repos/coala/coala-quickstart/languages","stargazers_url":"https://api.github.com/repos/coala/coala-quickstart/stargazers","contributors_url":"https://api.github.com/repos/coala/coala-quickstart/contributors","subscribers_url":"https://api.github.com/repos/coala/coala-quickstart/subscribers","subscription_url":"https://api.github.com/repos/coala/coala-quickstart/subscription","commits_url":"https://api.github.com/repos/coala/coala-quickstart/commits{/sha}","git_commits_url":"https://api.github.com/repos/coala/coala-quickstart/git/commits{/sha}","comments_url":"https://api.github.com/repos/coala/coala-quickstart/comments{/number}","issue_comment_url":"https://api.github.com/repos/coala/coala-quickstart/issues/comments{/number}","contents_url":"https://api.github.com/repos/coala/coala-quickstart/contents/{+path}","compare_url":"https://api.github.com/repos/coala/coala-quickstart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coala/coala-quickstart/merges","archive_url":"https://api.github.com/repos/coala/coala-quickstart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coala/coala-quickstart/downloads","issues_url":"https://api.github.com/repos/coala/coala-quickstart/issues{/number}","pulls_url":"https://api.github.com/repos/coala/coala-quickstart/pulls{/number}","milestones_url":"https://api.github.com/repos/coala/coala-quickstart/milestones{/number}","notifications_url":"https://api.github.com/repos/coala/coala-quickstart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coala/coala-quickstart/labels{/name}","releases_url":"https://api.github.com/repos/coala/coala-quickstart/releases{/id}","deployments_url":"https://api.github.com/repos/coala/coala-quickstart/deployments","created_at":"2016-03-01T15:55:10Z","updated_at":"2017-07-04T12:54:37Z","pushed_at":"2017-07-19T12:51:15Z","git_url":"git://github.com/coala/coala-quickstart.git","ssh_url":"git@github.com:coala/coala-quickstart.git","clone_url":"https://github.com/coala/coala-quickstart.git","svn_url":"https://github.com/coala/coala-quickstart","homepage":"","size":93,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":45,"forks":23,"open_issues":45,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133"},"html":{"href":"https://github.com/coala/coala-quickstart/pull/133"},"issue":{"href":"https://api.github.com/repos/coala/coala-quickstart/issues/133"},"comments":{"href":"https://api.github.com/repos/coala/coala-quickstart/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/coala/coala-quickstart/statuses/6ffd6719cadc3f920b8f806bd6012575b0a2e02b"}}}}
{"actor":{"display_login":"gitmate-bot"}}