{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/44452351","id":44452351,"diff_hunk":"@@ -739,3 +742,25 @@ def setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, paral\n             connections[alias].force_debug_cursor = True\n \n     return old_names\n+\n+\n+def filter_tests_by_tags(suite, tags, exclude_tags):\n+    suite_class = type(suite)\n+    filtered_suite = suite_class()\n+    for test in suite:\n+        if isinstance(test, suite_class):\n+            filtered_suite.addTests(filter_tests_by_tags(test, tags, exclude_tags))\n+        else:\n+            test_tags = set(getattr(test, 'tags', set()))","path":"django/test/runner.py","position":55,"original_position":55,"commit_id":"dc597a522a2083df957e7e78bb4040c8b5efd442","original_commit_id":"dc597a522a2083df957e7e78bb4040c8b5efd442","user":{"login":"carljm","id":61586,"avatar_url":"https://avatars.githubusercontent.com/u/61586?v=3","gravatar_id":"","url":"https://api.github.com/users/carljm","html_url":"https://github.com/carljm","followers_url":"https://api.github.com/users/carljm/followers","following_url":"https://api.github.com/users/carljm/following{/other_user}","gists_url":"https://api.github.com/users/carljm/gists{/gist_id}","starred_url":"https://api.github.com/users/carljm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carljm/subscriptions","organizations_url":"https://api.github.com/users/carljm/orgs","repos_url":"https://api.github.com/users/carljm/repos","events_url":"https://api.github.com/users/carljm/events{/privacy}","received_events_url":"https://api.github.com/users/carljm/received_events","type":"User","site_admin":false},"body":"I don't think the logic here is quite correct now, in terms of the interaction between `TestCase` level tags and test method level tags. The correct logic, I believe, is to first build up a set of all applicable tags (from both the `TestCase` and the test method), and then check that set of tags just once against `tags` and `exclude_tags`. The current logic here, if I'm reading it correctly, will short-circuit and accept a test if the `TestCase` level tags match, without ever checking the test-method tags, even if the test method is specifically tagged with an excluded tag.","created_at":"2015-11-10T19:27:13Z","updated_at":"2015-11-10T19:27:13Z","html_url":"https://github.com/django/django/pull/5585#discussion_r44452351","pull_request_url":"https://api.github.com/repos/django/django/pulls/5585","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/44452351"},"html":{"href":"https://github.com/django/django/pull/5585#discussion_r44452351"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/5585"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/5585","id":50036884,"html_url":"https://github.com/django/django/pull/5585","diff_url":"https://github.com/django/django/pull/5585.diff","patch_url":"https://github.com/django/django/pull/5585.patch","issue_url":"https://api.github.com/repos/django/django/issues/5585","number":5585,"state":"open","locked":false,"title":"#25653 POC of tags in testrunner","user":{"login":"mrbox","id":160822,"avatar_url":"https://avatars.githubusercontent.com/u/160822?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbox","html_url":"https://github.com/mrbox","followers_url":"https://api.github.com/users/mrbox/followers","following_url":"https://api.github.com/users/mrbox/following{/other_user}","gists_url":"https://api.github.com/users/mrbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbox/subscriptions","organizations_url":"https://api.github.com/users/mrbox/orgs","repos_url":"https://api.github.com/users/mrbox/repos","events_url":"https://api.github.com/users/mrbox/events{/privacy}","received_events_url":"https://api.github.com/users/mrbox/received_events","type":"User","site_admin":false},"body":"It doesn't have extensive tests nor docs yet - the question is, is this direction that we want to move in?","created_at":"2015-11-07T14:16:28Z","updated_at":"2015-11-10T19:27:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fc042fa63b56a837278a344cf0b013de8ea90f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/5585/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/5585/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/5585/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/dc597a522a2083df957e7e78bb4040c8b5efd442","head":{"label":"mrbox:master","ref":"master","sha":"dc597a522a2083df957e7e78bb4040c8b5efd442","user":{"login":"mrbox","id":160822,"avatar_url":"https://avatars.githubusercontent.com/u/160822?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbox","html_url":"https://github.com/mrbox","followers_url":"https://api.github.com/users/mrbox/followers","following_url":"https://api.github.com/users/mrbox/following{/other_user}","gists_url":"https://api.github.com/users/mrbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbox/subscriptions","organizations_url":"https://api.github.com/users/mrbox/orgs","repos_url":"https://api.github.com/users/mrbox/repos","events_url":"https://api.github.com/users/mrbox/events{/privacy}","received_events_url":"https://api.github.com/users/mrbox/received_events","type":"User","site_admin":false},"repo":{"id":26675661,"name":"django","full_name":"mrbox/django","owner":{"login":"mrbox","id":160822,"avatar_url":"https://avatars.githubusercontent.com/u/160822?v=3","gravatar_id":"","url":"https://api.github.com/users/mrbox","html_url":"https://github.com/mrbox","followers_url":"https://api.github.com/users/mrbox/followers","following_url":"https://api.github.com/users/mrbox/following{/other_user}","gists_url":"https://api.github.com/users/mrbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mrbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrbox/subscriptions","organizations_url":"https://api.github.com/users/mrbox/orgs","repos_url":"https://api.github.com/users/mrbox/repos","events_url":"https://api.github.com/users/mrbox/events{/privacy}","received_events_url":"https://api.github.com/users/mrbox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrbox/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/mrbox/django","forks_url":"https://api.github.com/repos/mrbox/django/forks","keys_url":"https://api.github.com/repos/mrbox/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrbox/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrbox/django/teams","hooks_url":"https://api.github.com/repos/mrbox/django/hooks","issue_events_url":"https://api.github.com/repos/mrbox/django/issues/events{/number}","events_url":"https://api.github.com/repos/mrbox/django/events","assignees_url":"https://api.github.com/repos/mrbox/django/assignees{/user}","branches_url":"https://api.github.com/repos/mrbox/django/branches{/branch}","tags_url":"https://api.github.com/repos/mrbox/django/tags","blobs_url":"https://api.github.com/repos/mrbox/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrbox/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrbox/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrbox/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrbox/django/statuses/{sha}","languages_url":"https://api.github.com/repos/mrbox/django/languages","stargazers_url":"https://api.github.com/repos/mrbox/django/stargazers","contributors_url":"https://api.github.com/repos/mrbox/django/contributors","subscribers_url":"https://api.github.com/repos/mrbox/django/subscribers","subscription_url":"https://api.github.com/repos/mrbox/django/subscription","commits_url":"https://api.github.com/repos/mrbox/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrbox/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrbox/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrbox/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrbox/django/contents/{+path}","compare_url":"https://api.github.com/repos/mrbox/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrbox/django/merges","archive_url":"https://api.github.com/repos/mrbox/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrbox/django/downloads","issues_url":"https://api.github.com/repos/mrbox/django/issues{/number}","pulls_url":"https://api.github.com/repos/mrbox/django/pulls{/number}","milestones_url":"https://api.github.com/repos/mrbox/django/milestones{/number}","notifications_url":"https://api.github.com/repos/mrbox/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrbox/django/labels{/name}","releases_url":"https://api.github.com/repos/mrbox/django/releases{/id}","created_at":"2014-11-15T09:43:50Z","updated_at":"2014-11-15T09:44:03Z","pushed_at":"2015-11-08T16:53:03Z","git_url":"git://github.com/mrbox/django.git","ssh_url":"git@github.com:mrbox/django.git","clone_url":"https://github.com/mrbox/django.git","svn_url":"https://github.com/mrbox/django","homepage":"https://www.djangoproject.com/","size":143288,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"django:master","ref":"master","sha":"1014ba026e879e56e0f265a8d9f54e6f39843348","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-11-10T19:23:10Z","pushed_at":"2015-11-10T19:13:55Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":324469,"stargazers_count":16642,"watchers_count":16642,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6760,"mirror_url":null,"open_issues_count":110,"forks":6760,"open_issues":110,"watchers":16642,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/5585"},"html":{"href":"https://github.com/django/django/pull/5585"},"issue":{"href":"https://api.github.com/repos/django/django/issues/5585"},"comments":{"href":"https://api.github.com/repos/django/django/issues/5585/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/5585/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/5585/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/dc597a522a2083df957e7e78bb4040c8b5efd442"}}}}