{"action":"created","comment":{"url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/comments/33321950","id":33321950,"diff_hunk":"@@ -0,0 +1,51 @@\n+from __future__ import unicode_literals\n+import pytest\n+\n+from stack import Stack\n+\n+\n+@pytest.fixture\n+def base_stack():\n+    return Stack([1, 2, 3])\n+\n+\n+def test_construct_from_iterable_valid(base_stack):\n+    expected_output = \"(1, 2, 3)\"\n+    assert base_stack.__repr__() == expected_output\n+\n+\n+def test_construct_from_nested_iterable_valid():\n+    arg = ([1, 2, 3], 'string')\n+    expected_output = \"([1, 2, 3], u'string')\"\n+    assert Stack(arg).__repr__() == expected_output\n+\n+\n+def test_construct_from_string_valid():\n+    arg = \"string\"\n+    expected_output = \"(u's', u't', u'r', u'i', u'n', u'g')\"\n+    assert Stack(arg).__repr__() == expected_output\n+\n+\n+def test_construct_empty_valid():\n+    expected_output = \"()\"\n+    assert Stack().__repr__() == expected_output\n+\n+\n+def test_construct_from_none_fails():\n+    with pytest.raises(TypeError):\n+        Stack(None)\n+\n+\n+def test_construct_from_single_integer_fails():\n+    with pytest.raises(TypeError):\n+        Stack(2)","path":"test_stack.py","position":41,"original_position":41,"commit_id":"3d62b9e280ce46ded05a9045f3dde88d47123c43","original_commit_id":"3d62b9e280ce46ded05a9045f3dde88d47123c43","user":{"login":"jonathanstallings","id":10945369,"avatar_url":"https://avatars.githubusercontent.com/u/10945369?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanstallings","html_url":"https://github.com/jonathanstallings","followers_url":"https://api.github.com/users/jonathanstallings/followers","following_url":"https://api.github.com/users/jonathanstallings/following{/other_user}","gists_url":"https://api.github.com/users/jonathanstallings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanstallings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanstallings/subscriptions","organizations_url":"https://api.github.com/users/jonathanstallings/orgs","repos_url":"https://api.github.com/users/jonathanstallings/repos","events_url":"https://api.github.com/users/jonathanstallings/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanstallings/received_events","type":"User","site_admin":false},"body":"Makes sense. We were using the behavior of built ins like list as a guide here.\r\n\r\n`list(1)` raises a TypeError. It only accepts iterables.","created_at":"2015-06-26T01:19:21Z","updated_at":"2015-06-26T01:19:21Z","html_url":"https://github.com/jonathanstallings/data-structures/pull/1#discussion_r33321950","pull_request_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/comments/33321950"},"html":{"href":"https://github.com/jonathanstallings/data-structures/pull/1#discussion_r33321950"},"pull_request":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1","id":38606065,"html_url":"https://github.com/jonathanstallings/data-structures/pull/1","diff_url":"https://github.com/jonathanstallings/data-structures/pull/1.diff","patch_url":"https://github.com/jonathanstallings/data-structures/pull/1.patch","issue_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/1","number":1,"state":"closed","locked":false,"title":"Implementation of Stack data structure","user":{"login":"jay-tyler","id":7076233,"avatar_url":"https://avatars.githubusercontent.com/u/7076233?v=3","gravatar_id":"","url":"https://api.github.com/users/jay-tyler","html_url":"https://github.com/jay-tyler","followers_url":"https://api.github.com/users/jay-tyler/followers","following_url":"https://api.github.com/users/jay-tyler/following{/other_user}","gists_url":"https://api.github.com/users/jay-tyler/gists{/gist_id}","starred_url":"https://api.github.com/users/jay-tyler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay-tyler/subscriptions","organizations_url":"https://api.github.com/users/jay-tyler/orgs","repos_url":"https://api.github.com/users/jay-tyler/repos","events_url":"https://api.github.com/users/jay-tyler/events{/privacy}","received_events_url":"https://api.github.com/users/jay-tyler/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-25T23:58:07Z","updated_at":"2015-06-26T01:19:21Z","closed_at":"2015-06-26T00:29:23Z","merged_at":"2015-06-26T00:29:23Z","merge_commit_sha":"336eb11da5bb581ffadc3cc22b18c8b7552fb850","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/1/comments","statuses_url":"https://api.github.com/repos/jonathanstallings/data-structures/statuses/3d62b9e280ce46ded05a9045f3dde88d47123c43","head":{"label":"jonathanstallings:stack","ref":"stack","sha":"3d62b9e280ce46ded05a9045f3dde88d47123c43","user":{"login":"jonathanstallings","id":10945369,"avatar_url":"https://avatars.githubusercontent.com/u/10945369?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanstallings","html_url":"https://github.com/jonathanstallings","followers_url":"https://api.github.com/users/jonathanstallings/followers","following_url":"https://api.github.com/users/jonathanstallings/following{/other_user}","gists_url":"https://api.github.com/users/jonathanstallings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanstallings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanstallings/subscriptions","organizations_url":"https://api.github.com/users/jonathanstallings/orgs","repos_url":"https://api.github.com/users/jonathanstallings/repos","events_url":"https://api.github.com/users/jonathanstallings/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanstallings/received_events","type":"User","site_admin":false},"repo":{"id":38007754,"name":"data-structures","full_name":"jonathanstallings/data-structures","owner":{"login":"jonathanstallings","id":10945369,"avatar_url":"https://avatars.githubusercontent.com/u/10945369?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanstallings","html_url":"https://github.com/jonathanstallings","followers_url":"https://api.github.com/users/jonathanstallings/followers","following_url":"https://api.github.com/users/jonathanstallings/following{/other_user}","gists_url":"https://api.github.com/users/jonathanstallings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanstallings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanstallings/subscriptions","organizations_url":"https://api.github.com/users/jonathanstallings/orgs","repos_url":"https://api.github.com/users/jonathanstallings/repos","events_url":"https://api.github.com/users/jonathanstallings/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanstallings/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonathanstallings/data-structures","description":"An assignment to implement a singly-linked list in Python","fork":false,"url":"https://api.github.com/repos/jonathanstallings/data-structures","forks_url":"https://api.github.com/repos/jonathanstallings/data-structures/forks","keys_url":"https://api.github.com/repos/jonathanstallings/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonathanstallings/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonathanstallings/data-structures/teams","hooks_url":"https://api.github.com/repos/jonathanstallings/data-structures/hooks","issue_events_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/jonathanstallings/data-structures/events","assignees_url":"https://api.github.com/repos/jonathanstallings/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/jonathanstallings/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/jonathanstallings/data-structures/tags","blobs_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonathanstallings/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jonathanstallings/data-structures/languages","stargazers_url":"https://api.github.com/repos/jonathanstallings/data-structures/stargazers","contributors_url":"https://api.github.com/repos/jonathanstallings/data-structures/contributors","subscribers_url":"https://api.github.com/repos/jonathanstallings/data-structures/subscribers","subscription_url":"https://api.github.com/repos/jonathanstallings/data-structures/subscription","commits_url":"https://api.github.com/repos/jonathanstallings/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonathanstallings/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonathanstallings/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/jonathanstallings/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonathanstallings/data-structures/merges","archive_url":"https://api.github.com/repos/jonathanstallings/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonathanstallings/data-structures/downloads","issues_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jonathanstallings/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jonathanstallings/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonathanstallings/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/jonathanstallings/data-structures/releases{/id}","created_at":"2015-06-24T19:57:09Z","updated_at":"2015-06-24T21:25:27Z","pushed_at":"2015-06-26T00:37:00Z","git_url":"git://github.com/jonathanstallings/data-structures.git","ssh_url":"git@github.com:jonathanstallings/data-structures.git","clone_url":"https://github.com/jonathanstallings/data-structures.git","svn_url":"https://github.com/jonathanstallings/data-structures","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jonathanstallings:master","ref":"master","sha":"f3cce8646dc2824cb32088764b191e22b9c85c43","user":{"login":"jonathanstallings","id":10945369,"avatar_url":"https://avatars.githubusercontent.com/u/10945369?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanstallings","html_url":"https://github.com/jonathanstallings","followers_url":"https://api.github.com/users/jonathanstallings/followers","following_url":"https://api.github.com/users/jonathanstallings/following{/other_user}","gists_url":"https://api.github.com/users/jonathanstallings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanstallings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanstallings/subscriptions","organizations_url":"https://api.github.com/users/jonathanstallings/orgs","repos_url":"https://api.github.com/users/jonathanstallings/repos","events_url":"https://api.github.com/users/jonathanstallings/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanstallings/received_events","type":"User","site_admin":false},"repo":{"id":38007754,"name":"data-structures","full_name":"jonathanstallings/data-structures","owner":{"login":"jonathanstallings","id":10945369,"avatar_url":"https://avatars.githubusercontent.com/u/10945369?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanstallings","html_url":"https://github.com/jonathanstallings","followers_url":"https://api.github.com/users/jonathanstallings/followers","following_url":"https://api.github.com/users/jonathanstallings/following{/other_user}","gists_url":"https://api.github.com/users/jonathanstallings/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanstallings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanstallings/subscriptions","organizations_url":"https://api.github.com/users/jonathanstallings/orgs","repos_url":"https://api.github.com/users/jonathanstallings/repos","events_url":"https://api.github.com/users/jonathanstallings/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanstallings/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonathanstallings/data-structures","description":"An assignment to implement a singly-linked list in Python","fork":false,"url":"https://api.github.com/repos/jonathanstallings/data-structures","forks_url":"https://api.github.com/repos/jonathanstallings/data-structures/forks","keys_url":"https://api.github.com/repos/jonathanstallings/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonathanstallings/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonathanstallings/data-structures/teams","hooks_url":"https://api.github.com/repos/jonathanstallings/data-structures/hooks","issue_events_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/jonathanstallings/data-structures/events","assignees_url":"https://api.github.com/repos/jonathanstallings/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/jonathanstallings/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/jonathanstallings/data-structures/tags","blobs_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonathanstallings/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jonathanstallings/data-structures/languages","stargazers_url":"https://api.github.com/repos/jonathanstallings/data-structures/stargazers","contributors_url":"https://api.github.com/repos/jonathanstallings/data-structures/contributors","subscribers_url":"https://api.github.com/repos/jonathanstallings/data-structures/subscribers","subscription_url":"https://api.github.com/repos/jonathanstallings/data-structures/subscription","commits_url":"https://api.github.com/repos/jonathanstallings/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonathanstallings/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonathanstallings/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonathanstallings/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/jonathanstallings/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonathanstallings/data-structures/merges","archive_url":"https://api.github.com/repos/jonathanstallings/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonathanstallings/data-structures/downloads","issues_url":"https://api.github.com/repos/jonathanstallings/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/jonathanstallings/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jonathanstallings/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jonathanstallings/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonathanstallings/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/jonathanstallings/data-structures/releases{/id}","created_at":"2015-06-24T19:57:09Z","updated_at":"2015-06-24T21:25:27Z","pushed_at":"2015-06-26T00:37:00Z","git_url":"git://github.com/jonathanstallings/data-structures.git","ssh_url":"git@github.com:jonathanstallings/data-structures.git","clone_url":"https://github.com/jonathanstallings/data-structures.git","svn_url":"https://github.com/jonathanstallings/data-structures","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1"},"html":{"href":"https://github.com/jonathanstallings/data-structures/pull/1"},"issue":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/issues/1"},"comments":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jonathanstallings/data-structures/statuses/3d62b9e280ce46ded05a9045f3dde88d47123c43"}}}}