Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent doctest failure in sage/misc/sage_eval.py #1080

Closed
sagetrac-cwitty mannequin opened this issue Nov 3, 2007 · 1 comment
Closed

inconsistent doctest failure in sage/misc/sage_eval.py #1080

sagetrac-cwitty mannequin opened this issue Nov 3, 2007 · 1 comment

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Nov 3, 2007

On one of my machines (64-bit x86 Debian testing), doctesting sage/misc/sage_eval.py sometimes fails with:

**********************************************************************
File "sage_eval.py", line 92:
    sage: ff = gap.eval('x:=IndeterminatesOfPolynomialRing(R);; f:=x^2+1;'); ff
Expected:
    'x^2+1'
Got:
    '1'
**********************************************************************
File "sage_eval.py", line 94:
    sage: sage_eval(ff, locals={'x':x})
Expected:
    x^2 + 1
Got:
    1
**********************************************************************
File "sage_eval.py", line 96:
    sage: eval(ff)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Use ** for exponentiation, not '^', which means xor
    in Python, and has the wrong precedence.
Got:
    1
**********************************************************************
1 items had failures:
   3 of  27 in __main__.example_1

(This fails about half the times I run it.)

It looks like some sort of timing issue.

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/1080

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-2.8.12 milestone Nov 3, 2007
@sagetrac-cwitty sagetrac-cwitty mannequin self-assigned this Nov 3, 2007
@sagetrac-cwitty
Copy link
Mannequin Author

sagetrac-cwitty mannequin commented Nov 3, 2007

comment:1

Attachment: 1080.patch.gz

Found it. Gap sends garbage collection information that starts with an '@', followed by one of these characters '123456!"#$%&', and then terminated by a plus sign. The code was sometimes grabbing too much data, including part of the real Gap output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant