sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.36k stars 462 forks source link

[with postive review] sage-2.10.2.alpha1 -- breakage in new totally_rel.py #2229

Closed williamstein closed 16 years ago

williamstein commented 16 years ago

I don't know about this code at all, but something is messed up:

         [2.8 s]
sage -t  devel/sage-main/sage/rings/number_field/totallyreal_rel.py**********************************************************************
File "totallyreal_rel.py", line 654:
    sage: [NumberField(ZZx(_[i][1]), 't').is_galois() for i in range(len(_))]
Exception raised:
    Traceback (most recent call last):
      File "/home/was/build/sage-2.10.2.alpha1/local/lib/python2.5/doctest.py", line 1212, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.example_6[7]>", line 1, in <module>
        [NumberField(ZZx(_[i][Integer(1)]), 't').is_galois() for i in range(len(_))]###line 654:
    sage: [NumberField(ZZx(_[i][1]), 't').is_galois() for i in range(len(_))]
    TypeError: 'int' object is unsubscriptable
**********************************************************************
1 items had failures:
   1 of  11 in __main__.example_6
***Test Failed*** 1 failures.
For whitespace errors, see the file .doctest_totallyreal_rel.py
         [50.8 s]

Component: number theory

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

craigcitro commented 16 years ago
comment:1

So I don't see this doctest failure on my machine, but looking at the doctests, they're clearly nonsense (i.e. the above error should be showing up on my machine). I'm very curious why it doesn't.

In any event, the attached patch should fix it.

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:2

Attachment: trac-2229.patch.gz

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:3

The patch fixes the doctest failure, positive review.

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:4

Merged in Sage 2.10.2.alpha2