#10296: Singular interface wasting time by waiting for the prompt too often
-----------------------------------------------------------------------+----
Reporter: SimonKing |
Owner: was
Type: enhancement |
Status: needs_work
Priority: major |
Milestone: sage-4.7.1
Component: interfaces |
Resolution:
Keywords: Singular, _eval_line, synchronization, synchronisation |
Work_issues:
Upstream: N/A |
Reviewer: Martin Albrecht
Author: Simon King |
Merged:
Dependencies: |
-----------------------------------------------------------------------+----
Comment(by SimonKing):
Replying to [comment:42 fbissey]:
> On OS X 10.5.8 with 4.7.1.alpha1 I get the following after applying the
patch
> {{{
> sage -t -long "devel/sage/sage/interfaces/gap.py"
> **********************************************************************
> File
"/Users/frb15/Desktop/sage-4.7.1.alpha1/devel/sage/sage/interfaces/gap.py",
line 514:
> sage: gap.interrupt(timeout=1)
> Expected:
> True
> Got:
> False
> **********************************************************************
> }}}
That test is really annoying. I tried to make it more reliable by adding
the timeout parameter, but apparently it does not work like that.
However, the main point is that without the patch, we had
{{{
sage: cutoff = gap._eval_using_file_cutoff
sage: gap._eval_using_file_cutoff = 4
sage: gap._eval_line('while(1=1) do i:=1;; od;', wait_for_prompt=False)
<Runs forever>
}}}
In other words, we would not even come to the line `gap.interrupt()`.
I would not mind if the new test simply made sure that no error is raised.
It does not matter, IMHO, whether we have the return value `True` or
`False`. So, perhaps change it into
{{{
sage: gap.interrupt(timeout=1) is not None
True
}}}
or
{{{
sage: gap.interrupt(timeout=1)
...
}}}
?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10296#comment:43>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.