Closed mantepse closed 6 years ago
Description changed:
---
+++
@@ -1 +1,6 @@
+Currently, long lines my get parsed wrong, as the leading double quote in the following example shows. This ticket makes the parsing (slightly) more robust.
+```
+sage: fricas.get_string("unparse((-1234567890123456789012345678901234567890123456789012345678901234567890*n::EXPR INT)::INFORM)")
+'"(-1234567890123456789012345678901234567890123456789012345678901234567890)*n'
+```
Author: Martin Rubey
Branch pushed to git repo; I updated commit sha1. New commits:
ef80dba | make parsing of output a little more robust |
Changed keywords from none to FriCAS
ok
Reviewer: Frédéric Chapoton
sage -t --long src/sage/interfaces/fricas.py
**********************************************************************
File "src/sage/interfaces/fricas.py", line 602, in sage.interfaces.fricas.FriCAS.get_string
Failed example:
fricas.get_string("unparse((-1234567890123456789012345678901234567890123456789012345678901234567890*n::EXPR INT)::INFORM)")
Exception raised:
Traceback (most recent call last):
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 573, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 983, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.interfaces.fricas.FriCAS.get_string[0]>", line 1, in <module>
fricas.get_string("unparse((-1234567890123456789012345678901234567890123456789012345678901234567890*n::EXPR INT)::INFORM)")
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/fricas.py", line 608, in get_string
return self.get(str(var)).replace("\n", "").strip()[1:-1]
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/fricas.py", line 569, in get
output = self.eval(str(var), reformat=False)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/fricas.py", line 774, in eval
**kwds)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1354, in eval
for L in code.split('\n') if L != ''])
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 917, in _eval_line
self._start()
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/fricas.py", line 296, in _start
Expect._start(self)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 508, in _start
(self.name(), cmd, e, self._install_hints()))
RuntimeError: unable to start fricas because the command 'fricas -nosman' failed: The command was not found or was not executable: fricas.
**********************************************************************
Branch pushed to git repo; I updated commit sha1. New commits:
47f631c | add missing # optional - fricas |
Thank you for catching that!
(the pyflakes stuff is fixed in #25544)
ok. Sorry for that.
Changed branch from u/mantepse/fix_problem_with_leading_space_in_fricas_interface to 47f631c
Currently, long lines my get parsed wrong, as the leading double quote in the following example shows. This ticket makes the parsing (slightly) more robust.
CC: @rwst
Component: interfaces: optional
Keywords: FriCAS
Author: Martin Rubey
Branch/Commit:
47f631c
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/25606