Skip to content

Commit

Permalink
Merge pull request #59 from skirpichev/misc-fixes
Browse files Browse the repository at this point in the history
Misc fixes
  • Loading branch information
skirpichev committed Apr 16, 2015
2 parents 51902e9 + 4e2385a commit c491416
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sympy/printing/pretty/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ def _print_Limit(self, l):
e, z, z0, dir = l.args

E = self._print(e)
if e.is_Add:
E = prettyForm(*E.parens())
Lim = prettyForm('lim')

LimArg = self._print(z)
Expand Down
16 changes: 16 additions & 0 deletions sympy/printing/pretty/tests/test_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -3141,6 +3141,22 @@ def test_pretty_limits():
assert pretty(expr) == ascii_str
assert upretty(expr) == ucode_str

expr = Limit(x - 1/y, x, 1)
ascii_str = \
"""\
/ 1\\\n\
lim |x - -|\n\
x->1+\ y/\
"""
ucode_str = \
u("""\
⎛ 1⎞\n\
lim ⎜x - ─⎟\n\
x─→1⁺⎝ y⎠\
""")
assert pretty(expr) == ascii_str
assert upretty(expr) == ucode_str


def test_pretty_RootOf():
expr = RootOf(x**5 + 11*x - 2, 0)
Expand Down
3 changes: 1 addition & 2 deletions sympy/tests/test_wester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,8 +2064,7 @@ def test_T9():

@XFAIL
def test_T10():
# raises PoleError should return euler-mascheroni constant
limit(zeta(x) - 1/(x - 1), x, 1)
limit(zeta(x) - 1/(x - 1), x, 1) == EulerGamma


@XFAIL
Expand Down

0 comments on commit c491416

Please sign in to comment.