#17718: Further clean-up of expect.py
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.5
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers: Vincent Delecroix,
Report Upstream: N/A | Marc Mezzarobba
Branch: | Work issues:
u/jdemeyer/ticket/17718 | Commit:
Dependencies: #17704 | d556229dd9fec47e492a3543b0815ce02b4870de
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vbraun):
another failed example (seems to be falling over a prompt in the R docs if
you are unlucky with the timing):
{{{
$ SAGE_PEXPECT_LOG=yes sage -bt --long --verbose src/sage/interfaces/r.py
[...]
Trying (line 1955): print length._sage_doc_()
Expecting:
length package:base R Documentation
...
<BLANKLINE>
ok [0.04 s]
Trying (line 1959): sig_on_count()
Expecting:
0
ok [0.00 s]
Trying (line 1969): length = r.length
Expecting nothing
ok [0.00 s]
Trying (line 1970): print length._sage_src_()
Expecting:
Trying (line 1970): print length._sage_src_()
Expecting:
function (x) .Primitive("length")
ok [0.00 s]
Trying (line 1973): sig_on_count()
Expecting:
0
ok [0.00 s]
Trying (line 1981): length = r.length
Expecting nothing
ok [0.00 s]
Trying (line 1982): length([1,2,3])
Expecting:
[1] 3
... hangs ...
}}}
pexpect log:
{{{
[...]
Examples:
length(diag(4)) # = 16 (4 x 4)
length(options()) # 12 or more
length(y ~ x1 + x2 + x3) # 3
length(expression(x, {y <- x^2; y+2}, x^y)) # 3
## from example(warpbreaks)
require(stats)
fm1 <- lm(breaks ~ wool * tension, data = warpbreaks)
length(fm1$call) # 3, lm() and two arguments.
length(formula(fm1)) # 3, ~ lhs rhs
__SAGE__R__PROMPT__> 1+310416896;
[1] 310416897
__SAGE__R__PROMPT__> length
length
function (x) .Primitive("length")
__SAGE__R__PROMPT__> 1+1371999567;
[1] 1.372e+09
__SAGE__R__PROMPT__>
quit(save="no")
__SAGE__R__PROMPT__>
__SAGE__R__PROMPT__> ^C
quit(save="no")
sage2 <- 1
sage2 <- 1
1+1305756531;
quit(save="no")
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17718#comment:12>
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.