I think I know what's going on.

If you install the Gap optional packages, then reset the
workspace you get the behavior I see.  If you don't install
the optional packages you don't.  Thus one of the packages
changes the print behavior of Gap.

Indeed, here it is:

gap> LoadPackage("hap");
Loading HAP 1.7.5gamma ...
true
gap> PolynomialRing(Rationals,2);
PolynomialRing(..., [ x, x_2 ])

My solution will be to slightly change gap.py, so it does *not*
autoload hap into the workspace,  then change the doctests
back.    Note: In the old gap.py, hap wasn't loaded into the
workspace automatically -- I thought this was a mistake, but
evidently the reason is because hap slightly modifies
how certain things work with gap polynomial rings.  Annoying.

OK, I've pushed this out, so hg_sage.pull() will get you the
fixed version of gap.py.

William

On 10/21/07, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> William Stein wrote:
> > On 10/21/07, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> >> There seems to be some typos in the test of gap.py
> >
> > These are not typos.  The behavior of gap-4.4.10 changed from that
> > of gap-4.4.9, and the doctests reflect that change.  Evidently for
> > some reason your gap didn't get upgraded.   Try
> >
> >    sage: !gap
> >
>
> This is on a fresh install (but dito with the upgrade):
>
> GAP4, Version: 4.4.10 of 02-Oct-2007, i686-pc-linux-gnu-gcc
> gap>
>
> > to see what version of gap you now have.
> >
> > Also, you may need to do
> >    sage: gap_reset_workspace()
>
> That does not help. Same test failures.
>
> Jaap
>
>
> >>
> >> [EMAIL PROTECTED] sage-2.8.8]$ ./sage -t  
> >> devel/sage-main/sage/interfaces/gap.py
> >> sage -t  devel/sage-main/sage/interfaces/gap.py             
> >> **********************************************************************
> >> File "gap.py", line 69:
> >>      sage: R = gap.PolynomialRing('Rationals', 2); R
> >> Expected:
> >>      PolynomialRing(..., [ x, x_2 ])
> >> Got:
> >>      PolynomialRing(..., [ x_1, x_2 ])
> >> **********************************************************************
> >> File "gap.py", line 71:
> >>      sage: I = R.IndeterminatesOfPolynomialRing(); I
> >> Expected:
> >>      [ x, x_2 ]
> >> Got:
> >>      [ x_1, x_2 ]
> >> **********************************************************************
> >> File "gap.py", line 86:
> >>      sage: f = gap(str(g)); f
> >> Expected:
> >>      -x^5+x_2^2
> >> Got:
> >>      -x_1^5+x_2^2
> >> **********************************************************************
> >> 1 items had failures:
> >>     3 of  22 in __main__.example_0
> >> ***Test Failed*** 3 failures.
> >> For whitespace errors, see the file .doctest_gap.py
> >>           [2.4 s]
> >> exit code: 256
> >>
> >> ----------------------------------------------------------------------
> >> The following tests failed:
> >>
> >>
> >>          sage -t  devel/sage-main/sage/interfaces/gap.py
> >> Total time for all tests: 2.4 seconds
> >> [EMAIL PROTECTED] sage-2.8.8]$
> >>
> >>
> >
> >
>
>
> >
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to