{"action":"created","comment":{"url":"https://api.github.com/repos/allure-framework/allure-python/pulls/comments/190638366","pull_request_review_id":123057765,"id":190638366,"diff_hunk":"@@ -107,3 +107,40 @@ def has_test_case(name, *matchers):\n                                         )\n                                  )\n                         )\n+\n+\n+class ContainsExactly(BaseMatcher):\n+\n+    def __init__(self, num, matcher):\n+        self.matcher = matcher\n+        self.count = 0\n+        self.num = num\n+\n+    def _matches(self, item):\n+        self.count = 0\n+        for subitem in item:\n+            if self.matcher.matches(subitem):\n+                self.count += 1\n+\n+        if self.count == self.num:\n+            return True\n+        else:\n+            return False\n+\n+    def describe_to(self, description):\n+        description.append_text('exactly {} item(s) matching '.format(self.num)).append_text(self.matcher)\n+\n+\n+def has_only_n_test_cases(name, num, *matchers):\n+    return has_property('test_cases',\n+                        ContainsExactly(num,\n+                                        all_of(\n+                                                any_of(\n+                                                        has_entry('fullName', ends_with(name)),\n+                                                        has_entry('name', ends_with(name))\n+                                                        ),\n+                                                *matchers\n+                                              )\n+                                        )\n+                        )\n+","path":"allure-python-commons-test/src/report.py","position":49,"original_position":49,"commit_id":"91a462986fdf63d9f8e69a844b79f46f661a2148","original_commit_id":"91a462986fdf63d9f8e69a844b79f46f661a2148","user":{"login":"Sup3rGeo","id":20566367,"avatar_url":"https://avatars2.githubusercontent.com/u/20566367?v=4","gravatar_id":"","url":"https://api.github.com/users/Sup3rGeo","html_url":"https://github.com/Sup3rGeo","followers_url":"https://api.github.com/users/Sup3rGeo/followers","following_url":"https://api.github.com/users/Sup3rGeo/following{/other_user}","gists_url":"https://api.github.com/users/Sup3rGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sup3rGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sup3rGeo/subscriptions","organizations_url":"https://api.github.com/users/Sup3rGeo/orgs","repos_url":"https://api.github.com/users/Sup3rGeo/repos","events_url":"https://api.github.com/users/Sup3rGeo/events{/privacy}","received_events_url":"https://api.github.com/users/Sup3rGeo/received_events","type":"User","site_admin":false},"body":"Those custom hamcrest matchers are not the most beautiful ever. First time using it. Maybe there is an easier way to do it.","created_at":"2018-05-24T15:48:49Z","updated_at":"2018-05-24T15:48:50Z","html_url":"https://github.com/allure-framework/allure-python/pull/234#discussion_r190638366","pull_request_url":"https://api.github.com/repos/allure-framework/allure-python/pulls/234","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/comments/190638366"},"html":{"href":"https://github.com/allure-framework/allure-python/pull/234#discussion_r190638366"},"pull_request":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/allure-framework/allure-python/pulls/234","id":190336678,"html_url":"https://github.com/allure-framework/allure-python/pull/234","diff_url":"https://github.com/allure-framework/allure-python/pull/234.diff","patch_url":"https://github.com/allure-framework/allure-python/pull/234.patch","issue_url":"https://api.github.com/repos/allure-framework/allure-python/issues/234","number":234,"state":"open","locked":false,"title":"Feature clean alluredir","user":{"login":"Sup3rGeo","id":20566367,"avatar_url":"https://avatars2.githubusercontent.com/u/20566367?v=4","gravatar_id":"","url":"https://api.github.com/users/Sup3rGeo","html_url":"https://github.com/Sup3rGeo","followers_url":"https://api.github.com/users/Sup3rGeo/followers","following_url":"https://api.github.com/users/Sup3rGeo/following{/other_user}","gists_url":"https://api.github.com/users/Sup3rGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sup3rGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sup3rGeo/subscriptions","organizations_url":"https://api.github.com/users/Sup3rGeo/orgs","repos_url":"https://api.github.com/users/Sup3rGeo/repos","events_url":"https://api.github.com/users/Sup3rGeo/events{/privacy}","received_events_url":"https://api.github.com/users/Sup3rGeo/received_events","type":"User","site_admin":false},"body":"[//]: # (\r\n. Thank you so much for sending us a pull request! \r\n.\r\n. Make sure you have a clear name for your pull request. \r\n. The name should start with a capital letter and no dot is required in the end of the sentence.\r\n. To link the request with isses use the following notation: (fixes #123, fixes #321\\)\r\n.\r\n. An example of good pull request names:\r\n. - Add Russian translation (fixes #123\\)\r\n. - Add an ability to disable default plugins\r\n. - Support emoji in test descriptions\r\n)\r\n\r\n### Context\r\n[//]: # (\r\nDescribe the problem or feature in addition to a link to the issues\r\n)\r\nAdds `--clean-alluredir` option to clean alluredir results if folder exists (fixes #175).\r\n\r\n#### Checklist\r\n- [x] [Sign Allure CLA][cla]\r\n- [x] Provide unit tests\r\n\r\n[cla]: https://cla-assistant.io/accept/allure-framework/allure2\r\n","created_at":"2018-05-24T15:47:03Z","updated_at":"2018-05-24T15:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec20dfde44ed39145adaf968424116168f41c8f4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/allure-framework/allure-python/pulls/234/commits","review_comments_url":"https://api.github.com/repos/allure-framework/allure-python/pulls/234/comments","review_comment_url":"https://api.github.com/repos/allure-framework/allure-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/allure-framework/allure-python/issues/234/comments","statuses_url":"https://api.github.com/repos/allure-framework/allure-python/statuses/91a462986fdf63d9f8e69a844b79f46f661a2148","head":{"label":"Sup3rGeo:feature-clean-alluredir","ref":"feature-clean-alluredir","sha":"91a462986fdf63d9f8e69a844b79f46f661a2148","user":{"login":"Sup3rGeo","id":20566367,"avatar_url":"https://avatars2.githubusercontent.com/u/20566367?v=4","gravatar_id":"","url":"https://api.github.com/users/Sup3rGeo","html_url":"https://github.com/Sup3rGeo","followers_url":"https://api.github.com/users/Sup3rGeo/followers","following_url":"https://api.github.com/users/Sup3rGeo/following{/other_user}","gists_url":"https://api.github.com/users/Sup3rGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sup3rGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sup3rGeo/subscriptions","organizations_url":"https://api.github.com/users/Sup3rGeo/orgs","repos_url":"https://api.github.com/users/Sup3rGeo/repos","events_url":"https://api.github.com/users/Sup3rGeo/events{/privacy}","received_events_url":"https://api.github.com/users/Sup3rGeo/received_events","type":"User","site_admin":false},"repo":{"id":124048979,"name":"allure-python","full_name":"Sup3rGeo/allure-python","owner":{"login":"Sup3rGeo","id":20566367,"avatar_url":"https://avatars2.githubusercontent.com/u/20566367?v=4","gravatar_id":"","url":"https://api.github.com/users/Sup3rGeo","html_url":"https://github.com/Sup3rGeo","followers_url":"https://api.github.com/users/Sup3rGeo/followers","following_url":"https://api.github.com/users/Sup3rGeo/following{/other_user}","gists_url":"https://api.github.com/users/Sup3rGeo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sup3rGeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sup3rGeo/subscriptions","organizations_url":"https://api.github.com/users/Sup3rGeo/orgs","repos_url":"https://api.github.com/users/Sup3rGeo/repos","events_url":"https://api.github.com/users/Sup3rGeo/events{/privacy}","received_events_url":"https://api.github.com/users/Sup3rGeo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sup3rGeo/allure-python","description":"Allure integrations for python test frameworks","fork":true,"url":"https://api.github.com/repos/Sup3rGeo/allure-python","forks_url":"https://api.github.com/repos/Sup3rGeo/allure-python/forks","keys_url":"https://api.github.com/repos/Sup3rGeo/allure-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sup3rGeo/allure-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sup3rGeo/allure-python/teams","hooks_url":"https://api.github.com/repos/Sup3rGeo/allure-python/hooks","issue_events_url":"https://api.github.com/repos/Sup3rGeo/allure-python/issues/events{/number}","events_url":"https://api.github.com/repos/Sup3rGeo/allure-python/events","assignees_url":"https://api.github.com/repos/Sup3rGeo/allure-python/assignees{/user}","branches_url":"https://api.github.com/repos/Sup3rGeo/allure-python/branches{/branch}","tags_url":"https://api.github.com/repos/Sup3rGeo/allure-python/tags","blobs_url":"https://api.github.com/repos/Sup3rGeo/allure-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sup3rGeo/allure-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sup3rGeo/allure-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sup3rGeo/allure-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sup3rGeo/allure-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Sup3rGeo/allure-python/languages","stargazers_url":"https://api.github.com/repos/Sup3rGeo/allure-python/stargazers","contributors_url":"https://api.github.com/repos/Sup3rGeo/allure-python/contributors","subscribers_url":"https://api.github.com/repos/Sup3rGeo/allure-python/subscribers","subscription_url":"https://api.github.com/repos/Sup3rGeo/allure-python/subscription","commits_url":"https://api.github.com/repos/Sup3rGeo/allure-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sup3rGeo/allure-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sup3rGeo/allure-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sup3rGeo/allure-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sup3rGeo/allure-python/contents/{+path}","compare_url":"https://api.github.com/repos/Sup3rGeo/allure-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sup3rGeo/allure-python/merges","archive_url":"https://api.github.com/repos/Sup3rGeo/allure-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sup3rGeo/allure-python/downloads","issues_url":"https://api.github.com/repos/Sup3rGeo/allure-python/issues{/number}","pulls_url":"https://api.github.com/repos/Sup3rGeo/allure-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Sup3rGeo/allure-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Sup3rGeo/allure-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sup3rGeo/allure-python/labels{/name}","releases_url":"https://api.github.com/repos/Sup3rGeo/allure-python/releases{/id}","deployments_url":"https://api.github.com/repos/Sup3rGeo/allure-python/deployments","created_at":"2018-03-06T08:51:10Z","updated_at":"2018-05-24T11:47:56Z","pushed_at":"2018-05-24T15:42:47Z","git_url":"git://github.com/Sup3rGeo/allure-python.git","ssh_url":"git@github.com:Sup3rGeo/allure-python.git","clone_url":"https://github.com/Sup3rGeo/allure-python.git","svn_url":"https://github.com/Sup3rGeo/allure-python","homepage":"","size":223,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"allure-framework:master","ref":"master","sha":"af87869c9e996fea0516d66846865986c6deff0e","user":{"login":"allure-framework","id":5879127,"avatar_url":"https://avatars0.githubusercontent.com/u/5879127?v=4","gravatar_id":"","url":"https://api.github.com/users/allure-framework","html_url":"https://github.com/allure-framework","followers_url":"https://api.github.com/users/allure-framework/followers","following_url":"https://api.github.com/users/allure-framework/following{/other_user}","gists_url":"https://api.github.com/users/allure-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/allure-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allure-framework/subscriptions","organizations_url":"https://api.github.com/users/allure-framework/orgs","repos_url":"https://api.github.com/users/allure-framework/repos","events_url":"https://api.github.com/users/allure-framework/events{/privacy}","received_events_url":"https://api.github.com/users/allure-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":79346720,"name":"allure-python","full_name":"allure-framework/allure-python","owner":{"login":"allure-framework","id":5879127,"avatar_url":"https://avatars0.githubusercontent.com/u/5879127?v=4","gravatar_id":"","url":"https://api.github.com/users/allure-framework","html_url":"https://github.com/allure-framework","followers_url":"https://api.github.com/users/allure-framework/followers","following_url":"https://api.github.com/users/allure-framework/following{/other_user}","gists_url":"https://api.github.com/users/allure-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/allure-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allure-framework/subscriptions","organizations_url":"https://api.github.com/users/allure-framework/orgs","repos_url":"https://api.github.com/users/allure-framework/repos","events_url":"https://api.github.com/users/allure-framework/events{/privacy}","received_events_url":"https://api.github.com/users/allure-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/allure-framework/allure-python","description":"Allure integrations for python test frameworks","fork":false,"url":"https://api.github.com/repos/allure-framework/allure-python","forks_url":"https://api.github.com/repos/allure-framework/allure-python/forks","keys_url":"https://api.github.com/repos/allure-framework/allure-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allure-framework/allure-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allure-framework/allure-python/teams","hooks_url":"https://api.github.com/repos/allure-framework/allure-python/hooks","issue_events_url":"https://api.github.com/repos/allure-framework/allure-python/issues/events{/number}","events_url":"https://api.github.com/repos/allure-framework/allure-python/events","assignees_url":"https://api.github.com/repos/allure-framework/allure-python/assignees{/user}","branches_url":"https://api.github.com/repos/allure-framework/allure-python/branches{/branch}","tags_url":"https://api.github.com/repos/allure-framework/allure-python/tags","blobs_url":"https://api.github.com/repos/allure-framework/allure-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allure-framework/allure-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allure-framework/allure-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/allure-framework/allure-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allure-framework/allure-python/statuses/{sha}","languages_url":"https://api.github.com/repos/allure-framework/allure-python/languages","stargazers_url":"https://api.github.com/repos/allure-framework/allure-python/stargazers","contributors_url":"https://api.github.com/repos/allure-framework/allure-python/contributors","subscribers_url":"https://api.github.com/repos/allure-framework/allure-python/subscribers","subscription_url":"https://api.github.com/repos/allure-framework/allure-python/subscription","commits_url":"https://api.github.com/repos/allure-framework/allure-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/allure-framework/allure-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/allure-framework/allure-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/allure-framework/allure-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/allure-framework/allure-python/contents/{+path}","compare_url":"https://api.github.com/repos/allure-framework/allure-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allure-framework/allure-python/merges","archive_url":"https://api.github.com/repos/allure-framework/allure-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allure-framework/allure-python/downloads","issues_url":"https://api.github.com/repos/allure-framework/allure-python/issues{/number}","pulls_url":"https://api.github.com/repos/allure-framework/allure-python/pulls{/number}","milestones_url":"https://api.github.com/repos/allure-framework/allure-python/milestones{/number}","notifications_url":"https://api.github.com/repos/allure-framework/allure-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allure-framework/allure-python/labels{/name}","releases_url":"https://api.github.com/repos/allure-framework/allure-python/releases{/id}","deployments_url":"https://api.github.com/repos/allure-framework/allure-python/deployments","created_at":"2017-01-18T14:17:16Z","updated_at":"2018-05-23T16:04:44Z","pushed_at":"2018-05-24T15:47:03Z","git_url":"git://github.com/allure-framework/allure-python.git","ssh_url":"git@github.com:allure-framework/allure-python.git","clone_url":"https://github.com/allure-framework/allure-python.git","svn_url":"https://github.com/allure-framework/allure-python","homepage":"","size":219,"stargazers_count":73,"watchers_count":73,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":37,"open_issues":47,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/234"},"html":{"href":"https://github.com/allure-framework/allure-python/pull/234"},"issue":{"href":"https://api.github.com/repos/allure-framework/allure-python/issues/234"},"comments":{"href":"https://api.github.com/repos/allure-framework/allure-python/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/allure-framework/allure-python/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/allure-framework/allure-python/statuses/91a462986fdf63d9f8e69a844b79f46f661a2148"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Sup3rGeo"}}