{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/46051727","id":46051727,"diff_hunk":"@@ -31,3 +33,151 @@ def test_not_empty_in():\n     assert not_empty_in(FiniteSet(1).intersect(Interval(3, 4)), x) == S.EmptySet\n     assert not_empty_in(FiniteSet(x**2/(x + 2)).intersect(Interval(1, oo)), x) == \\\n         Union(Interval(-2, -1, True, False), Interval(2, oo))\n+\n+\n+def test_Limits():\n+    assert Limits(1, 2).delta == S(1)\n+    assert Limits(1, 2).mid == S(3)/2\n+\n+    assert Limits(1, 1) == S(1)\n+\n+    assert Limits(1, 2) + 1 == Limits(2, 3)\n+    assert 1 + Limits(1, 2) == Limits(2, 3)\n+    assert Limits(1, 2) + Limits(2, 3) == Limits(3, 5)\n+\n+    assert -Limits(1, 2) == Limits(-2, -1)\n+\n+    assert Limits(1, 2) - 1 == Limits(0, 1)\n+    assert 1 - Limits(1, 2) == Limits(-1, 0)\n+    assert Limits(2, 3) - Limits(1, 2) == Limits(0, 2)\n+\n+    assert x + Limits(1, 2) == Add(Limits(1, 2), x)\n+    assert a + Limits(1, 2) == Limits(1 + a, 2 + a)\n+    assert Limits(1, 2) - x == Add(Limits(1, 2), -x)\n+\n+    assert Limits(-oo, 1) + oo == Limits(-oo, oo)\n+    assert Limits(1, oo) + oo == oo\n+    assert Limits(1, oo) - oo == Limits(-oo, oo)\n+    assert (-oo - Limits(-1, oo)) == -oo\n+    assert Limits(-oo, 1) - oo == -oo\n+\n+    assert Limits(1, oo) - oo == Limits(-oo, oo)\n+    assert Limits(-oo, 1) - (-oo) == Limits(-oo, oo)\n+    assert (oo - Limits(1, oo)) == Limits(-oo, oo)\n+    assert (-oo - Limits(1, oo)) == -oo\n+\n+    assert Limits(1, 2)/2 == Limits(S(1)/2, 1)\n+    assert 2/Limits(2, 3) == Limits(S(2)/3, 1)\n+    assert 1/Limits(-1, 1) == Limits(-oo, oo)\n+\n+    assert abs(Limits(1, 2)) == Limits(1, 2)\n+    assert abs(Limits(-2, -1)) == Limits(1, 2)\n+    assert abs(Limits(-2, 1)) == Limits(0, 2)\n+    assert abs(Limits(-1, 2)) == Limits(0, 2)\n+\n+\n+def test_Limits_mul():\n+    assert Limits(1, 2)*2 == Limits(2, 4)\n+    assert 2*Limits(1, 2) == Limits(2, 4)\n+    assert Limits(1, 2)*Limits(2, 3) == Limits(2, 6)\n+\n+    assert Limits(1, 2)*0 == 0\n+    assert Limits(1, oo)*0 == Limits(0, oo)\n+    assert Limits(-oo, 1)*0 == Limits(-oo, 0)\n+    assert Limits(-oo, oo)*0 == Limits(-oo, oo)\n+\n+    assert Limits(1, 2)*x == Mul(Limits(1, 2), x, evaluate=False)\n+\n+    assert Limits(0, 2)*oo == Limits(0, oo)\n+    assert Limits(-2, 0)*oo == Limits(-oo, 0)\n+    assert Limits(0, 2)*(-oo) == Limits(-oo, 0)\n+    assert Limits(-2, 0)*(-oo) == Limits(0, oo)\n+    assert Limits(-1, 1)*oo == Limits(-oo, oo)\n+    assert Limits(-1, 1)*(-oo) == Limits(-oo, oo)\n+    assert Limits(-oo, oo) == Limits(-oo, oo)\n+\n+\n+def test_Limits_div():\n+    assert Limits(-1, 3)/Limits(3, 4) == Limits(-S(1)/3, 1)\n+    assert Limits(-2, 4)/Limits(-3, 4) == Limits(-oo, oo)\n+    assert Limits(-3, -2)/Limits(-4, 0) == Limits(S(1)/2, oo)\n+#    assert Limits(-3, -2)/Limits(-2, 1) == Union(Limits(-oo, -2), Limits(1, oo))","path":"sympy/calculus/tests/test_util.py","position":83,"original_position":83,"commit_id":"afba20937c079ac2fa9d4ed83353166a50c2023d","original_commit_id":"afba20937c079ac2fa9d4ed83353166a50c2023d","user":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"body":"Here is the example where the division of two `Limits` is not a `Limits` object. I will try to see this.","created_at":"2015-11-27T14:40:31Z","updated_at":"2015-11-27T14:40:31Z","html_url":"https://github.com/sympy/sympy/pull/10051#discussion_r46051727","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/10051","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/46051727"},"html":{"href":"https://github.com/sympy/sympy/pull/10051#discussion_r46051727"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/10051","id":48900061,"html_url":"https://github.com/sympy/sympy/pull/10051","diff_url":"https://github.com/sympy/sympy/pull/10051.diff","patch_url":"https://github.com/sympy/sympy/pull/10051.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/10051","number":10051,"state":"open","locked":false,"title":"Implementation of \"Limits\"(different from Limit) in SymPy","user":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"body":"For information regarding \"What Limits is?\" see commit message.\r\nPlease bear with me, i am not very good at writing `OOP` in `Python right now. But will try to improve upon this.\r\nping @jksuom","created_at":"2015-10-27T16:57:33Z","updated_at":"2015-11-27T14:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"624438144a1c5479292af93ae98ff20f7a15563c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/10051/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/10051/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/10051/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/afba20937c079ac2fa9d4ed83353166a50c2023d","head":{"label":"gxyd:implementation_limits","ref":"implementation_limits","sha":"afba20937c079ac2fa9d4ed83353166a50c2023d","user":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"repo":{"id":23004594,"name":"sympy","full_name":"gxyd/sympy","owner":{"login":"gxyd","id":7712241,"avatar_url":"https://avatars.githubusercontent.com/u/7712241?v=3","gravatar_id":"","url":"https://api.github.com/users/gxyd","html_url":"https://github.com/gxyd","followers_url":"https://api.github.com/users/gxyd/followers","following_url":"https://api.github.com/users/gxyd/following{/other_user}","gists_url":"https://api.github.com/users/gxyd/gists{/gist_id}","starred_url":"https://api.github.com/users/gxyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gxyd/subscriptions","organizations_url":"https://api.github.com/users/gxyd/orgs","repos_url":"https://api.github.com/users/gxyd/repos","events_url":"https://api.github.com/users/gxyd/events{/privacy}","received_events_url":"https://api.github.com/users/gxyd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gxyd/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/gxyd/sympy","forks_url":"https://api.github.com/repos/gxyd/sympy/forks","keys_url":"https://api.github.com/repos/gxyd/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gxyd/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gxyd/sympy/teams","hooks_url":"https://api.github.com/repos/gxyd/sympy/hooks","issue_events_url":"https://api.github.com/repos/gxyd/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/gxyd/sympy/events","assignees_url":"https://api.github.com/repos/gxyd/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/gxyd/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/gxyd/sympy/tags","blobs_url":"https://api.github.com/repos/gxyd/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gxyd/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gxyd/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/gxyd/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gxyd/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/gxyd/sympy/languages","stargazers_url":"https://api.github.com/repos/gxyd/sympy/stargazers","contributors_url":"https://api.github.com/repos/gxyd/sympy/contributors","subscribers_url":"https://api.github.com/repos/gxyd/sympy/subscribers","subscription_url":"https://api.github.com/repos/gxyd/sympy/subscription","commits_url":"https://api.github.com/repos/gxyd/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/gxyd/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/gxyd/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/gxyd/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/gxyd/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/gxyd/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gxyd/sympy/merges","archive_url":"https://api.github.com/repos/gxyd/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gxyd/sympy/downloads","issues_url":"https://api.github.com/repos/gxyd/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/gxyd/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/gxyd/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/gxyd/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gxyd/sympy/labels{/name}","releases_url":"https://api.github.com/repos/gxyd/sympy/releases{/id}","created_at":"2014-08-15T22:08:09Z","updated_at":"2015-07-04T12:40:41Z","pushed_at":"2015-11-27T14:36:23Z","git_url":"git://github.com/gxyd/sympy.git","ssh_url":"git@github.com:gxyd/sympy.git","clone_url":"https://github.com/gxyd/sympy.git","svn_url":"https://github.com/gxyd/sympy","homepage":"http://sympy.org/","size":73123,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"bf990d085afe47bbdde420c5e2e271a01377c487","user":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","created_at":"2010-04-30T20:37:14Z","updated_at":"2015-11-26T22:57:37Z","pushed_at":"2015-11-27T14:36:24Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":102300,"stargazers_count":2471,"watchers_count":2471,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1209,"mirror_url":null,"open_issues_count":2069,"forks":1209,"open_issues":2069,"watchers":2471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051"},"html":{"href":"https://github.com/sympy/sympy/pull/10051"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/10051"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/10051/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10051/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/afba20937c079ac2fa9d4ed83353166a50c2023d"}}}}