{"action":"created","comment":{"url":"https://api.github.com/repos/shoyer/pandas/pulls/comments/49268557","id":49268557,"diff_hunk":"@@ -63,10 +63,79 @@ def test_hash(self):\n         # should not raise\n         hash(self.interval)\n \n-    # def test_math(self):\n-    #     expected = Interval(1, 2)\n-    #     actual = self.interval + 1\n-    #     self.assertEqual(expected, actual)\n+    def test_math_add(self):\n+        expected = Interval(1, 2)\n+        actual = self.interval + 1\n+        self.assertEqual(expected, actual)\n+\n+        expected = Interval(1, 2)\n+        actual = 1 + self.interval\n+        self.assertEqual(expected, actual)\n+\n+        actual = self.interval\n+        actual += 1\n+        self.assertEqual(expected, actual)\n+\n+        with self.assertRaises(TypeError):\n+            self.interval + Interval(1, 2)\n+\n+    def test_math_sub(self):\n+        expected = Interval(-1, 0)\n+        actual = self.interval - 1\n+        self.assertEqual(expected, actual)\n+\n+        expected = Interval(-1, 0)\n+        actual = 1 - self.interval\n+        self.assertEqual(expected, actual)\n+\n+        actual = self.interval\n+        actual -= 1\n+        self.assertEqual(expected, actual)\n+\n+        with self.assertRaises(TypeError):\n+            self.interval - Interval(1, 2)\n+\n+    def test_math_mult(self):\n+        expected = Interval(0, 2)\n+        actual = self.interval * 2\n+        self.assertEqual(expected, actual)\n+\n+        actual = self.interval\n+        actual *= 2\n+        self.assertEqual(expected, actual)\n+\n+        with self.assertRaises(TypeError):\n+            self.interval * Interval(1, 2)\n+\n+    def test_math_div_py3(self):\n+        # Floor division\n+        expected = Interval(0, 0)\n+        actual = self.interval // 2\n+        self.assertEqual(expected, actual)\n+\n+        expected = Interval(0, 0.5)\n+        actual = self.interval / 2\n+        self.assertEqual(expected, actual)\n+\n+        actual = self.interval\n+        actual /= 2\n+        self.assertEqual(expected, actual)\n+\n+        with self.assertRaises(TypeError):\n+            self.interval / Interval(1, 2)\n+\n+def test_math_div_py2(self):","path":"pandas/tests/test_interval.py","position":69,"original_position":69,"commit_id":"e1079ebfc198b8887640b7b334bc7dddb8a1c54b","original_commit_id":"e1079ebfc198b8887640b7b334bc7dddb8a1c54b","user":{"login":"shoyer","id":1217238,"avatar_url":"https://avatars.githubusercontent.com/u/1217238?v=3","gravatar_id":"","url":"https://api.github.com/users/shoyer","html_url":"https://github.com/shoyer","followers_url":"https://api.github.com/users/shoyer/followers","following_url":"https://api.github.com/users/shoyer/following{/other_user}","gists_url":"https://api.github.com/users/shoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/shoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoyer/subscriptions","organizations_url":"https://api.github.com/users/shoyer/orgs","repos_url":"https://api.github.com/users/shoyer/repos","events_url":"https://api.github.com/users/shoyer/events{/privacy}","received_events_url":"https://api.github.com/users/shoyer/received_events","type":"User","site_admin":false},"body":"indentation","created_at":"2016-01-09T21:50:04Z","updated_at":"2016-01-09T21:50:04Z","html_url":"https://github.com/shoyer/pandas/pull/4#discussion_r49268557","pull_request_url":"https://api.github.com/repos/shoyer/pandas/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/comments/49268557"},"html":{"href":"https://github.com/shoyer/pandas/pull/4#discussion_r49268557"},"pull_request":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/shoyer/pandas/pulls/4","id":55371990,"html_url":"https://github.com/shoyer/pandas/pull/4","diff_url":"https://github.com/shoyer/pandas/pull/4.diff","patch_url":"https://github.com/shoyer/pandas/pull/4.patch","issue_url":"https://api.github.com/repos/shoyer/pandas/issues/4","number":4,"state":"open","locked":false,"title":"Adding Arthimetic operations","user":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"body":"Let me know if I'm missing anything.\r\n\r\nNote, I didn't think it would make sense to have reverse operations (i.e. `1+Interval(1, 2)`)\r\nSo that functionality isn't added atm.  ","created_at":"2016-01-07T18:26:38Z","updated_at":"2016-01-09T21:50:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8db7c0d866a4cd0aea1ea770bbb94e2c655c1e16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shoyer/pandas/pulls/4/commits","review_comments_url":"https://api.github.com/repos/shoyer/pandas/pulls/4/comments","review_comment_url":"https://api.github.com/repos/shoyer/pandas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shoyer/pandas/issues/4/comments","statuses_url":"https://api.github.com/repos/shoyer/pandas/statuses/e1079ebfc198b8887640b7b334bc7dddb8a1c54b","head":{"label":"mortonjt:arthimetic","ref":"arthimetic","sha":"e1079ebfc198b8887640b7b334bc7dddb8a1c54b","user":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"repo":{"id":47721889,"name":"pandas","full_name":"mortonjt/pandas","owner":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mortonjt/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":true,"url":"https://api.github.com/repos/mortonjt/pandas","forks_url":"https://api.github.com/repos/mortonjt/pandas/forks","keys_url":"https://api.github.com/repos/mortonjt/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mortonjt/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mortonjt/pandas/teams","hooks_url":"https://api.github.com/repos/mortonjt/pandas/hooks","issue_events_url":"https://api.github.com/repos/mortonjt/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/mortonjt/pandas/events","assignees_url":"https://api.github.com/repos/mortonjt/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/mortonjt/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/mortonjt/pandas/tags","blobs_url":"https://api.github.com/repos/mortonjt/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mortonjt/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mortonjt/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/mortonjt/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mortonjt/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/mortonjt/pandas/languages","stargazers_url":"https://api.github.com/repos/mortonjt/pandas/stargazers","contributors_url":"https://api.github.com/repos/mortonjt/pandas/contributors","subscribers_url":"https://api.github.com/repos/mortonjt/pandas/subscribers","subscription_url":"https://api.github.com/repos/mortonjt/pandas/subscription","commits_url":"https://api.github.com/repos/mortonjt/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/mortonjt/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/mortonjt/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/mortonjt/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/mortonjt/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/mortonjt/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mortonjt/pandas/merges","archive_url":"https://api.github.com/repos/mortonjt/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mortonjt/pandas/downloads","issues_url":"https://api.github.com/repos/mortonjt/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/mortonjt/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/mortonjt/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/mortonjt/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mortonjt/pandas/labels{/name}","releases_url":"https://api.github.com/repos/mortonjt/pandas/releases{/id}","created_at":"2015-12-09T22:02:53Z","updated_at":"2015-12-09T22:02:58Z","pushed_at":"2016-01-09T19:47:03Z","git_url":"git://github.com/mortonjt/pandas.git","ssh_url":"git@github.com:mortonjt/pandas.git","clone_url":"https://github.com/mortonjt/pandas.git","svn_url":"https://github.com/mortonjt/pandas","homepage":"http://pandas.pydata.org","size":69780,"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":"shoyer:IntervalIndex","ref":"IntervalIndex","sha":"25fe51d5b72bed4ecd9a53941fad94a811e6cb42","user":{"login":"shoyer","id":1217238,"avatar_url":"https://avatars.githubusercontent.com/u/1217238?v=3","gravatar_id":"","url":"https://api.github.com/users/shoyer","html_url":"https://github.com/shoyer","followers_url":"https://api.github.com/users/shoyer/followers","following_url":"https://api.github.com/users/shoyer/following{/other_user}","gists_url":"https://api.github.com/users/shoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/shoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoyer/subscriptions","organizations_url":"https://api.github.com/users/shoyer/orgs","repos_url":"https://api.github.com/users/shoyer/repos","events_url":"https://api.github.com/users/shoyer/events{/privacy}","received_events_url":"https://api.github.com/users/shoyer/received_events","type":"User","site_admin":false},"repo":{"id":16186481,"name":"pandas","full_name":"shoyer/pandas","owner":{"login":"shoyer","id":1217238,"avatar_url":"https://avatars.githubusercontent.com/u/1217238?v=3","gravatar_id":"","url":"https://api.github.com/users/shoyer","html_url":"https://github.com/shoyer","followers_url":"https://api.github.com/users/shoyer/followers","following_url":"https://api.github.com/users/shoyer/following{/other_user}","gists_url":"https://api.github.com/users/shoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/shoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoyer/subscriptions","organizations_url":"https://api.github.com/users/shoyer/orgs","repos_url":"https://api.github.com/users/shoyer/repos","events_url":"https://api.github.com/users/shoyer/events{/privacy}","received_events_url":"https://api.github.com/users/shoyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shoyer/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":true,"url":"https://api.github.com/repos/shoyer/pandas","forks_url":"https://api.github.com/repos/shoyer/pandas/forks","keys_url":"https://api.github.com/repos/shoyer/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoyer/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoyer/pandas/teams","hooks_url":"https://api.github.com/repos/shoyer/pandas/hooks","issue_events_url":"https://api.github.com/repos/shoyer/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/shoyer/pandas/events","assignees_url":"https://api.github.com/repos/shoyer/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/shoyer/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/shoyer/pandas/tags","blobs_url":"https://api.github.com/repos/shoyer/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoyer/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoyer/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoyer/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoyer/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/shoyer/pandas/languages","stargazers_url":"https://api.github.com/repos/shoyer/pandas/stargazers","contributors_url":"https://api.github.com/repos/shoyer/pandas/contributors","subscribers_url":"https://api.github.com/repos/shoyer/pandas/subscribers","subscription_url":"https://api.github.com/repos/shoyer/pandas/subscription","commits_url":"https://api.github.com/repos/shoyer/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoyer/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoyer/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoyer/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoyer/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/shoyer/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoyer/pandas/merges","archive_url":"https://api.github.com/repos/shoyer/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoyer/pandas/downloads","issues_url":"https://api.github.com/repos/shoyer/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/shoyer/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/shoyer/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/shoyer/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoyer/pandas/labels{/name}","releases_url":"https://api.github.com/repos/shoyer/pandas/releases{/id}","created_at":"2014-01-23T21:38:59Z","updated_at":"2015-04-03T17:24:43Z","pushed_at":"2016-01-09T19:47:04Z","git_url":"git://github.com/shoyer/pandas.git","ssh_url":"git@github.com:shoyer/pandas.git","clone_url":"https://github.com/shoyer/pandas.git","svn_url":"https://github.com/shoyer/pandas","homepage":"http://pandas.pydata.org","size":69070,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/4"},"html":{"href":"https://github.com/shoyer/pandas/pull/4"},"issue":{"href":"https://api.github.com/repos/shoyer/pandas/issues/4"},"comments":{"href":"https://api.github.com/repos/shoyer/pandas/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shoyer/pandas/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/shoyer/pandas/statuses/e1079ebfc198b8887640b7b334bc7dddb8a1c54b"}}}}