#18908: mathematica interface hangs if mathematica is not installed
-------------------------------------+-------------------------------------
       Reporter:  dimpase            |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  interfaces:        |   Resolution:
  optional                           |    Merged in:
       Keywords:                     |    Reviewers:  Nathann Cohen,
        Authors:  Dima Pasechnik     |  Sébastien Labbé, Salvatore Stella
Report Upstream:  N/A                |  Work issues:
         Branch:  public/18908       |       Commit:
   Dependencies:                     |  6b9a1158e64480fe9daff56e179dc9d0fcbf689d
                                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by dimpase):

 Replying to [comment:16 slabbe]:
 > Wait, is there a way to doctest this fix?
 >
 > {{{
 > mathematica(10)  # not mathematica
 > Some error message...
 > }}}
 like this?
 {{{
 diff --git a/src/sage/interfaces/mathematica.py
 b/src/sage/interfaces/mathematica.py
 index aa5a848..04eaf9f 100644
 --- a/src/sage/interfaces/mathematica.py
 +++ b/src/sage/interfaces/mathematica.py
 @@ -729,6 +729,17 @@ class MathematicaElement(ExpectElement):
              0


 +        TESTS::
 +
 +            sage: import subprocess                  # optional -
 nomathematica
 +            sage: try:                               # optional -
 nomathematica
 +            ....:     subprocess.check_output('which math', shell=True)
 # optional - nomathematica
 +            ....: except:                            # optional -
 nomathematica
 +            ....:     mathematica(10)                # optional -
 nomathematica
 +            Traceback (most recent call last):
 +            ...
 +            TypeError: ...
 +
          AUTHORS:

          - Felix Lawrence (2010-11-03): Major rewrite to use ._sage_repr()
 and
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18908#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to