On Wed, Dec 7, 2011 at 11:57 AM, javier <vengor...@gmail.com> wrote:
> Hi Florent and Simon,
>
> many thanks! That makes sense, I really hadn't considered comparing a
> conjugacy class with an object of a different type. Testsuite and all
> test pass on my machine now, so the ticket is ready for review!


The following tests fail with sage-4.8.a3 on a 10.6.8 mac:



jeeves:sage-4.8.alpha3 wdj$ ./sage -t  -force_lib
"devel/sage/sage/groups/group.pyx"
sage -t -force_lib "devel/sage/sage/groups/group.pyx"
**********************************************************************
Error: TAB character found.
**********************************************************************
File "/Users/wdj/sagefiles/sage-4.8.alpha3/devel/sage/sage/groups/group.pyx",
line 247:
    sage: conjugacy_class(G,g)
Exception raised:
    Traceback (most recent call last):
      File "/Users/wdj/sagefiles/sage-4.8.alpha3/local/bin/ncadoctest.py",
line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/wdj/sagefiles/sage-4.8.alpha3/local/bin/sagedoctest.py",
line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
      File "/Users/wdj/sagefiles/sage-4.8.alpha3/local/bin/ncadoctest.py",
line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_16[4]>", line 1, in <module>
        conjugacy_class(G,g)###line 247:
    sage: conjugacy_class(G,g)
    NameError: name 'conjugacy_class' is not defined
**********************************************************************
1 items had failures:
   1 of   6 in __main__.example_16
***Test Failed*** 1 failures.
For whitespace errors, see the file /Users/wdj/.sage//tmp/group_79609.py
         [6.7 s]

----------------------------------------------------------------------
The following tests failed:


        sage -t -force_lib "devel/sage/sage/groups/group.pyx"
Total time for all tests: 6.8 seconds
jeeves:sage-4.8.alpha3 wdj$ ./sage -t  -force_lib
"devel/sage/sage/groups/group_conjugacy_class.py"
sage -t -force_lib "devel/sage/sage/groups/group_conjugacy_class.py"
**********************************************************************
File 
"/Users/wdj/sagefiles/sage-4.8.alpha3/devel/sage/sage/groups/group_conjugacy_class.py",
line 92:
    sage: d.set()
Expected:
    {[3 2]
    [2 4], [2 4]
    [3 0], [0 3]
    [4 2], [1 2]
    [4 1], [4 4]
    [1 3], [0 1]
    [2 2], [1 3]
    [1 1], [0 4]
    [3 2], [1 1]
    [3 1], [3 4]
    [1 4], [2 1]
    [2 0], [4 1]
    [4 3], [1 4]
    [2 1], [4 2]
    [2 3], [2 2]
    [1 0], [0 2]
    [1 2], [4 3]
    [3 3], [3 3]
    [3 4], [2 3]
    [4 0], [3 1]
    [4 4]}
Got:
    {[3 2]
    [2 4], [0 1]
    [2 2], [3 4]
    [1 4], [0 3]
    [4 2], [1 2]
    [4 1], [2 1]
    [2 0], [4 1]
    [4 3], [4 4]
    [1 3], [2 4]
    [3 0], [1 4]
    [2 1], [3 3]
    [3 4], [2 3]
    [4 0], [0 2]
    [1 2], [1 3]
    [1 1], [4 3]
    [3 3], [4 2]
    [2 3], [0 4]
    [3 2], [1 1]
    [3 1], [2 2]
    [1 0], [3 1]
    [4 4]}
**********************************************************************
File 
"/Users/wdj/sagefiles/sage-4.8.alpha3/devel/sage/sage/groups/group_conjugacy_class.py",
line 141:
    sage: c.list()
Expected:
    [(1,3,2,4), (1,4,3,2), (1,3,4,2), (1,2,3,4), (1,4,2,3), (1,2,4,3)]
Got:
    [(1,4,3,2), (1,3,4,2), (1,3,2,4), (1,2,3,4), (1,2,4,3), (1,4,2,3)]
**********************************************************************
File 
"/Users/wdj/sagefiles/sage-4.8.alpha3/devel/sage/sage/groups/group_conjugacy_class.py",
line 151:
    sage: d.list()
Expected:
    [[3 2]
    [2 4], [2 4]
    [3 0], [0 3]
    [4 2], [1 2]
    [4 1], [4 4]
    [1 3], [0 1]
    [2 2], [1 3]
    [1 1], [0 4]
    [3 2], [1 1]
    [3 1], [3 4]
    [1 4], [2 1]
    [2 0], [4 1]
    [4 3], [1 4]
    [2 1], [4 2]
    [2 3], [2 2]
    [1 0], [0 2]
    [1 2], [4 3]
    [3 3], [3 3]
    [3 4], [2 3]
    [4 0], [3 1]
    [4 4]]
Got:
    [[3 2]
    [2 4], [0 1]
    [2 2], [3 4]
    [1 4], [0 3]
    [4 2], [1 2]
    [4 1], [2 1]
    [2 0], [4 1]
    [4 3], [4 4]
    [1 3], [2 4]
    [3 0], [1 4]
    [2 1], [3 3]
    [3 4], [2 3]
    [4 0], [0 2]
    [1 2], [1 3]
    [1 1], [4 3]
    [3 3], [4 2]
    [2 3], [0 4]
    [3 2], [1 1]
    [3 1], [2 2]
    [1 0], [3 1]
    [4 4]]
**********************************************************************
File 
"/Users/wdj/sagefiles/sage-4.8.alpha3/devel/sage/sage/groups/group_conjugacy_class.py",
line 214:
    sage: [x for x in c]
Expected:
    [(1,3,2,4), (1,4,3,2), (1,3,4,2), (1,2,3,4), (1,4,2,3), (1,2,4,3)]
Got:
    [(1,4,3,2), (1,3,4,2), (1,3,2,4), (1,2,3,4), (1,2,4,3), (1,4,2,3)]
**********************************************************************
3 items had failures:
   1 of  13 in __main__.example_3
   2 of  13 in __main__.example_4
   1 of   7 in __main__.example_7
***Test Failed*** 4 failures.
For whitespace errors, see the file
/Users/wdj/.sage//tmp/group_conjugacy_class_79647.py
         [5.0 s]

----------------------------------------------------------------------
The following tests failed:


        sage -t -force_lib "devel/sage/sage/groups/group_conjugacy_class.py"
Total time for all tests: 5.0 seconds




>
> The computation of underlying sets of conjugacy classes for matrix
> groups is terribly slow for now due to the .sage() method failing for
> gap matrices. I could come around this issue by defining another class
> just for matrix groups, but I don't think is worth it. A quick fix
> would be replacing the set method in ConjugacyClassGAP to take into
> account whether the group is a permutation group or a matrix group,
> but such a test would need to be rewritten if/when matrix/permutation
> groups get included in the category framework. In the long run I think
> the best method is to fix the .sage() method for gap objects so that
> it works on gap matrices, but this is for another ticket.
>
> Cheers,
> Javier
>
> On Dec 7, 12:46 pm, Florent Hivert <florent.hiv...@lri.fr> wrote:
>>       Hi Simon,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > On 7 Dez., 10:16, Simon King <simon.k...@uni-jena.de> wrote:
>> > > But in both cases, it is also assumed that you are using coercion.
>> > > Hence, when the test "self==None" raises an error or returns a wrong
>> > > result then it could also be that there is a wrong coercion.
>>
>> > Ouch, sorry, I thought that your conjugacy classes are the *elements*
>> > of some parent. But after a brief look at your code, I see that a
>> > conjugacy class *is* a parent.
>>
>> > So, forget what I said in my previous post: That was about elements.
>>
>> > For parents, you simply implement a __cmp__ method (or perhaps
>> > __richcmp__), but you must not make any assumption on the type of the
>> > second argument. It is generally expected in Python that a comparison
>> > will *never* raise an exception, and you need to write your __cmp__
>> > accordingly.
>>
>> Indeed ! This is exactly the purpose of having TestSuite checking comparison
>> with None. You should get False and not an exception. Thanks for the
>> clarification.
>>
>> Maybe the error message for TestSuite should be made clearer (catching the
>> exception and writing an error message that an exception was thrown where
>> false is expected.
>>
>> Cheers,
>>
>> Florent
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to