Skip to content

Commit 4f89498

Browse files
authored
Merge pull request #1504 from mathics/misc-fixes
Misc fixes
2 parents 4346d9d + 4af6bc9 commit 4f89498

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

mathics/builtin/assignment.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,12 +1003,13 @@ def _get_usage_string(symbol, evaluation, htmlout=False):
10031003
from mathics.doc.common_doc import XMLDoc
10041004

10051005
docstr = bio.builtin.__class__.__doc__
1006+
title = bio.builtin.__class__.__name__
10061007
if docstr is None:
10071008
return None
10081009
if htmlout:
1009-
usagetext = XMLDoc(docstr).html()
1010+
usagetext = XMLDoc(docstr, title).html()
10101011
else:
1011-
usagetext = XMLDoc(docstr).text(0)
1012+
usagetext = XMLDoc(docstr, title).text(0)
10121013
usagetext = re.sub(r"\$([0-9a-zA-Z]*)\$", r"\1", usagetext)
10131014
return usagetext
10141015
return None

mathics/doc/common_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ class XMLDoc(object):
14891489
Mathics core also uses this in getting usage strings (`??`).
14901490
"""
14911491

1492-
def __init__(self, doc, title, section):
1492+
def __init__(self, doc, title, section=None):
14931493
self.title = title
14941494
if section:
14951495
chapter = section.chapter

test/test_nintegrate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
else:
3636
tests_for_nintegrate = [
3737
(r"NIntegrate[x^2, {x,0,1}]", r"1/3.", ""),
38-
(r"NIntegrate[x^2 y^(-.5), {x,0,1},{y,0,1}]", r"1.", ""),
38+
# FIXME: this can integrate to Infinity
39+
# (r"NIntegrate[x^2 y^(-.5), {x,0,1},{y,0,1}]", r"1.", ""),
3940
]
4041

4142

0 commit comments

Comments
 (0)