From 7bf6b549e5bf4122f2378516264d8f176c4e3aa4 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sun, 28 Mar 2021 08:25:43 +0300 Subject: [PATCH] Add regression test Closes sympy/sympy#19442 Closes sympy/sympy#11667 --- diofant/tests/series/test_limits.py | 6 +++++- docs/release/notes-0.13.rst | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/diofant/tests/series/test_limits.py b/diofant/tests/series/test_limits.py index 316561dfe69..5c113dcea8e 100644 --- a/diofant/tests/series/test_limits.py +++ b/diofant/tests/series/test_limits.py @@ -25,7 +25,7 @@ def test_basic1(): assert limit(x**2, x, -oo) == oo assert limit(-x**2, x, oo) == -oo assert limit(x*log(x), x, 0, dir='+') == 0 - assert limit(1/x, x, oo) == 0 + assert limit(1/x, x, oo) == 0 # issue sympy/sympy#11667 assert limit(exp(x), x, oo) == oo assert limit(-exp(x), x, oo) == -oo assert limit(exp(x)/x, x, oo) == oo @@ -846,3 +846,7 @@ def test_sympyissue_19453(): assert limit(e - h*w/2, beta, oo) == 0 assert limit(e.simplify() - h*w/2, beta, oo) == 0 + + +def test_sympyissue_19442(): + pytest.raises(PoleError, lambda: limit(1/x, x, 0, 'real')) diff --git a/docs/release/notes-0.13.rst b/docs/release/notes-0.13.rst index 53ec3d27393..1e042360ff4 100644 --- a/docs/release/notes-0.13.rst +++ b/docs/release/notes-0.13.rst @@ -67,3 +67,5 @@ These Sympy issues also were addressed: * :sympyissue:`20578`: A strange behavior of limit function * :sympyissue:`20444`: Leading Term with log * :sympyissue:`19453`: Limit changes from simplification of original expression +* :sympyissue:`19442`: Non-existent bi-directional limit gives ValueError +* :sympyissue:`11667`: limit(1/x, x, 0) == oo ??