{"action":"created","comment":{"url":"https://api.github.com/repos/python-openxml/python-docx/pulls/comments/61133567","id":61133567,"diff_hunk":"@@ -34,9 +34,30 @@ def it_can_iterate_over_its_tab_stops(self, iter_fixture):\n         assert count == expected_count\n         assert TabStop_.call_args_list == expected_calls\n \n+    def it_can_get_a_tab_stop_by_index(self, index_fixture):\n+        tab_stops, expected_vals, tab_stop_, TabStop_, expected_calls = (\n+            index_fixture\n+        )\n+        for count in range(len(tab_stops)):\n+            assert tab_stops[count] is tab_stop_\n+        assert TabStop_.call_args_list == expected_calls\n+","path":"tests/text/test_tabstops.py","position":44,"original_position":11,"commit_id":"5668a5dd1c7feda9b5c3f1859752318cc9baf8f9","original_commit_id":"5668a5dd1c7feda9b5c3f1859752318cc9baf8f9","user":{"login":"scanny","id":2062718,"avatar_url":"https://avatars.githubusercontent.com/u/2062718?v=3","gravatar_id":"","url":"https://api.github.com/users/scanny","html_url":"https://github.com/scanny","followers_url":"https://api.github.com/users/scanny/followers","following_url":"https://api.github.com/users/scanny/following{/other_user}","gists_url":"https://api.github.com/users/scanny/gists{/gist_id}","starred_url":"https://api.github.com/users/scanny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scanny/subscriptions","organizations_url":"https://api.github.com/users/scanny/orgs","repos_url":"https://api.github.com/users/scanny/repos","events_url":"https://api.github.com/users/scanny/events{/privacy}","received_events_url":"https://api.github.com/users/scanny/received_events","type":"User","site_admin":false},"body":"Btw, in response to a specific question in your prior comment:\r\n\r\nThe TabStop_ mock gets called here every time your code calls TabStop(); setting up that class mock replaces the TabStop object in the tabstops module with TabStop_. When TabStop_ gets called, it doesn't create a TabStop object, but it does remember every time it was called and with what. So when we test `TabStop_.assert_called_once_with(tab)`, we're testing to make sure our code called TabStop exactly once, and passed the w:tab element of interest as a parameter.\r\n\r\nA mock also has a discoverable return value on .return_value. So we set TabStop_.return_value to the tab_stop_ mock (that's done in the component definition), then we can test that our code returned the return value of TabStop, as it should.","created_at":"2016-04-26T17:57:14Z","updated_at":"2016-04-26T17:57:14Z","html_url":"https://github.com/python-openxml/python-docx/pull/261#discussion_r61133567","pull_request_url":"https://api.github.com/repos/python-openxml/python-docx/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/comments/61133567"},"html":{"href":"https://github.com/python-openxml/python-docx/pull/261#discussion_r61133567"},"pull_request":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/python-openxml/python-docx/pulls/261","id":58941139,"html_url":"https://github.com/python-openxml/python-docx/pull/261","diff_url":"https://github.com/python-openxml/python-docx/pull/261.diff","patch_url":"https://github.com/python-openxml/python-docx/pull/261.patch","issue_url":"https://api.github.com/repos/python-openxml/python-docx/issues/261","number":261,"state":"open","locked":false,"title":"feature: tab stops","user":{"login":"DKWoods","id":12468493,"avatar_url":"https://avatars.githubusercontent.com/u/12468493?v=3","gravatar_id":"","url":"https://api.github.com/users/DKWoods","html_url":"https://github.com/DKWoods","followers_url":"https://api.github.com/users/DKWoods/followers","following_url":"https://api.github.com/users/DKWoods/following{/other_user}","gists_url":"https://api.github.com/users/DKWoods/gists{/gist_id}","starred_url":"https://api.github.com/users/DKWoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DKWoods/subscriptions","organizations_url":"https://api.github.com/users/DKWoods/orgs","repos_url":"https://api.github.com/users/DKWoods/repos","events_url":"https://api.github.com/users/DKWoods/events{/privacy}","received_events_url":"https://api.github.com/users/DKWoods/received_events","type":"User","site_admin":false},"body":"Analysis document for tab stop definition feature","created_at":"2016-02-10T19:33:39Z","updated_at":"2016-04-26T17:57:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d24a8503d4b66f0c02d28276dba59bbc2b5ae4a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/python-openxml/python-docx/pulls/261/commits","review_comments_url":"https://api.github.com/repos/python-openxml/python-docx/pulls/261/comments","review_comment_url":"https://api.github.com/repos/python-openxml/python-docx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python-openxml/python-docx/issues/261/comments","statuses_url":"https://api.github.com/repos/python-openxml/python-docx/statuses/5668a5dd1c7feda9b5c3f1859752318cc9baf8f9","head":{"label":"DKWoods:feature/tabstops","ref":"feature/tabstops","sha":"5668a5dd1c7feda9b5c3f1859752318cc9baf8f9","user":{"login":"DKWoods","id":12468493,"avatar_url":"https://avatars.githubusercontent.com/u/12468493?v=3","gravatar_id":"","url":"https://api.github.com/users/DKWoods","html_url":"https://github.com/DKWoods","followers_url":"https://api.github.com/users/DKWoods/followers","following_url":"https://api.github.com/users/DKWoods/following{/other_user}","gists_url":"https://api.github.com/users/DKWoods/gists{/gist_id}","starred_url":"https://api.github.com/users/DKWoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DKWoods/subscriptions","organizations_url":"https://api.github.com/users/DKWoods/orgs","repos_url":"https://api.github.com/users/DKWoods/repos","events_url":"https://api.github.com/users/DKWoods/events{/privacy}","received_events_url":"https://api.github.com/users/DKWoods/received_events","type":"User","site_admin":false},"repo":{"id":50443324,"name":"python-docx","full_name":"DKWoods/python-docx","owner":{"login":"DKWoods","id":12468493,"avatar_url":"https://avatars.githubusercontent.com/u/12468493?v=3","gravatar_id":"","url":"https://api.github.com/users/DKWoods","html_url":"https://github.com/DKWoods","followers_url":"https://api.github.com/users/DKWoods/followers","following_url":"https://api.github.com/users/DKWoods/following{/other_user}","gists_url":"https://api.github.com/users/DKWoods/gists{/gist_id}","starred_url":"https://api.github.com/users/DKWoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DKWoods/subscriptions","organizations_url":"https://api.github.com/users/DKWoods/orgs","repos_url":"https://api.github.com/users/DKWoods/repos","events_url":"https://api.github.com/users/DKWoods/events{/privacy}","received_events_url":"https://api.github.com/users/DKWoods/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DKWoods/python-docx","description":"Create and modify Word documents with Python","fork":true,"url":"https://api.github.com/repos/DKWoods/python-docx","forks_url":"https://api.github.com/repos/DKWoods/python-docx/forks","keys_url":"https://api.github.com/repos/DKWoods/python-docx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DKWoods/python-docx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DKWoods/python-docx/teams","hooks_url":"https://api.github.com/repos/DKWoods/python-docx/hooks","issue_events_url":"https://api.github.com/repos/DKWoods/python-docx/issues/events{/number}","events_url":"https://api.github.com/repos/DKWoods/python-docx/events","assignees_url":"https://api.github.com/repos/DKWoods/python-docx/assignees{/user}","branches_url":"https://api.github.com/repos/DKWoods/python-docx/branches{/branch}","tags_url":"https://api.github.com/repos/DKWoods/python-docx/tags","blobs_url":"https://api.github.com/repos/DKWoods/python-docx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DKWoods/python-docx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DKWoods/python-docx/git/refs{/sha}","trees_url":"https://api.github.com/repos/DKWoods/python-docx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DKWoods/python-docx/statuses/{sha}","languages_url":"https://api.github.com/repos/DKWoods/python-docx/languages","stargazers_url":"https://api.github.com/repos/DKWoods/python-docx/stargazers","contributors_url":"https://api.github.com/repos/DKWoods/python-docx/contributors","subscribers_url":"https://api.github.com/repos/DKWoods/python-docx/subscribers","subscription_url":"https://api.github.com/repos/DKWoods/python-docx/subscription","commits_url":"https://api.github.com/repos/DKWoods/python-docx/commits{/sha}","git_commits_url":"https://api.github.com/repos/DKWoods/python-docx/git/commits{/sha}","comments_url":"https://api.github.com/repos/DKWoods/python-docx/comments{/number}","issue_comment_url":"https://api.github.com/repos/DKWoods/python-docx/issues/comments{/number}","contents_url":"https://api.github.com/repos/DKWoods/python-docx/contents/{+path}","compare_url":"https://api.github.com/repos/DKWoods/python-docx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DKWoods/python-docx/merges","archive_url":"https://api.github.com/repos/DKWoods/python-docx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DKWoods/python-docx/downloads","issues_url":"https://api.github.com/repos/DKWoods/python-docx/issues{/number}","pulls_url":"https://api.github.com/repos/DKWoods/python-docx/pulls{/number}","milestones_url":"https://api.github.com/repos/DKWoods/python-docx/milestones{/number}","notifications_url":"https://api.github.com/repos/DKWoods/python-docx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DKWoods/python-docx/labels{/name}","releases_url":"https://api.github.com/repos/DKWoods/python-docx/releases{/id}","deployments_url":"https://api.github.com/repos/DKWoods/python-docx/deployments","created_at":"2016-01-26T16:46:10Z","updated_at":"2016-01-26T16:46:12Z","pushed_at":"2016-04-25T21:16:20Z","git_url":"git://github.com/DKWoods/python-docx.git","ssh_url":"git@github.com:DKWoods/python-docx.git","clone_url":"https://github.com/DKWoods/python-docx.git","svn_url":"https://github.com/DKWoods/python-docx","homepage":null,"size":44116,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"python-openxml:develop","ref":"develop","sha":"13dd6f0220e266461d17512a1c012d1049c2b6a3","user":{"login":"python-openxml","id":3403760,"avatar_url":"https://avatars.githubusercontent.com/u/3403760?v=3","gravatar_id":"","url":"https://api.github.com/users/python-openxml","html_url":"https://github.com/python-openxml","followers_url":"https://api.github.com/users/python-openxml/followers","following_url":"https://api.github.com/users/python-openxml/following{/other_user}","gists_url":"https://api.github.com/users/python-openxml/gists{/gist_id}","starred_url":"https://api.github.com/users/python-openxml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-openxml/subscriptions","organizations_url":"https://api.github.com/users/python-openxml/orgs","repos_url":"https://api.github.com/users/python-openxml/repos","events_url":"https://api.github.com/users/python-openxml/events{/privacy}","received_events_url":"https://api.github.com/users/python-openxml/received_events","type":"Organization","site_admin":false},"repo":{"id":13592924,"name":"python-docx","full_name":"python-openxml/python-docx","owner":{"login":"python-openxml","id":3403760,"avatar_url":"https://avatars.githubusercontent.com/u/3403760?v=3","gravatar_id":"","url":"https://api.github.com/users/python-openxml","html_url":"https://github.com/python-openxml","followers_url":"https://api.github.com/users/python-openxml/followers","following_url":"https://api.github.com/users/python-openxml/following{/other_user}","gists_url":"https://api.github.com/users/python-openxml/gists{/gist_id}","starred_url":"https://api.github.com/users/python-openxml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-openxml/subscriptions","organizations_url":"https://api.github.com/users/python-openxml/orgs","repos_url":"https://api.github.com/users/python-openxml/repos","events_url":"https://api.github.com/users/python-openxml/events{/privacy}","received_events_url":"https://api.github.com/users/python-openxml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python-openxml/python-docx","description":"Create and modify Word documents with Python","fork":false,"url":"https://api.github.com/repos/python-openxml/python-docx","forks_url":"https://api.github.com/repos/python-openxml/python-docx/forks","keys_url":"https://api.github.com/repos/python-openxml/python-docx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python-openxml/python-docx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python-openxml/python-docx/teams","hooks_url":"https://api.github.com/repos/python-openxml/python-docx/hooks","issue_events_url":"https://api.github.com/repos/python-openxml/python-docx/issues/events{/number}","events_url":"https://api.github.com/repos/python-openxml/python-docx/events","assignees_url":"https://api.github.com/repos/python-openxml/python-docx/assignees{/user}","branches_url":"https://api.github.com/repos/python-openxml/python-docx/branches{/branch}","tags_url":"https://api.github.com/repos/python-openxml/python-docx/tags","blobs_url":"https://api.github.com/repos/python-openxml/python-docx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python-openxml/python-docx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python-openxml/python-docx/git/refs{/sha}","trees_url":"https://api.github.com/repos/python-openxml/python-docx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python-openxml/python-docx/statuses/{sha}","languages_url":"https://api.github.com/repos/python-openxml/python-docx/languages","stargazers_url":"https://api.github.com/repos/python-openxml/python-docx/stargazers","contributors_url":"https://api.github.com/repos/python-openxml/python-docx/contributors","subscribers_url":"https://api.github.com/repos/python-openxml/python-docx/subscribers","subscription_url":"https://api.github.com/repos/python-openxml/python-docx/subscription","commits_url":"https://api.github.com/repos/python-openxml/python-docx/commits{/sha}","git_commits_url":"https://api.github.com/repos/python-openxml/python-docx/git/commits{/sha}","comments_url":"https://api.github.com/repos/python-openxml/python-docx/comments{/number}","issue_comment_url":"https://api.github.com/repos/python-openxml/python-docx/issues/comments{/number}","contents_url":"https://api.github.com/repos/python-openxml/python-docx/contents/{+path}","compare_url":"https://api.github.com/repos/python-openxml/python-docx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python-openxml/python-docx/merges","archive_url":"https://api.github.com/repos/python-openxml/python-docx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python-openxml/python-docx/downloads","issues_url":"https://api.github.com/repos/python-openxml/python-docx/issues{/number}","pulls_url":"https://api.github.com/repos/python-openxml/python-docx/pulls{/number}","milestones_url":"https://api.github.com/repos/python-openxml/python-docx/milestones{/number}","notifications_url":"https://api.github.com/repos/python-openxml/python-docx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python-openxml/python-docx/labels{/name}","releases_url":"https://api.github.com/repos/python-openxml/python-docx/releases{/id}","deployments_url":"https://api.github.com/repos/python-openxml/python-docx/deployments","created_at":"2013-10-15T14:50:41Z","updated_at":"2016-04-26T09:05:21Z","pushed_at":"2016-04-25T21:16:20Z","git_url":"git://github.com/python-openxml/python-docx.git","ssh_url":"git@github.com:python-openxml/python-docx.git","clone_url":"https://github.com/python-openxml/python-docx.git","svn_url":"https://github.com/python-openxml/python-docx","homepage":null,"size":45199,"stargazers_count":518,"watchers_count":518,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":132,"forks":189,"open_issues":132,"watchers":518,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/261"},"html":{"href":"https://github.com/python-openxml/python-docx/pull/261"},"issue":{"href":"https://api.github.com/repos/python-openxml/python-docx/issues/261"},"comments":{"href":"https://api.github.com/repos/python-openxml/python-docx/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python-openxml/python-docx/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/python-openxml/python-docx/statuses/5668a5dd1c7feda9b5c3f1859752318cc9baf8f9"}}}}