Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#6593 closed defect (fixed)

[with patch, positive review] WordMorphism: doctest failure in Fedora

Reported by: Sébastien Labbé Owned by: Sébastien Labbé
Priority: major Milestone: sage-4.1.1
Component: combinatorics Keywords: word morphism
Cc: Sage Combinat CC user, Jaap Spies Merged in: Sage 4.1.1.alpha1
Authors: Sébastien Labbé Reviewers: Jaap Spies
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

When sage-4.1.1.alpha0 was released (see http://groups.google.com/group/sage-devel/browse_thread/thread/267a2cb90085536b?hl=en), the following problem was reported :

Same here on Fedora 10 and Fedora 11, 32 bit.

In addition both in a fresh install and in an upgrade:

sage -t  "devel/sage/sage/combinat/words/morphism.py"
**********************************************************************
File "/home/jaap/Download/sage-4.1/devel/sage/sage/combinat/words/morphism.py", line 616:
     sage: m.extend_by(n)
Expected:
     Morphism from Words over Ordered Alphabet ['a', 'b', 0, 1] to Words over Ordered Alphabet ['a', 'b', 0, 1]
Got:
     Morphism from Words over Ordered Alphabet [0, 1, 'a', 'b'] to Words over Ordered Alphabet [0, 1, 'a', 'b']
**********************************************************************
File "/home/jaap/Download/sage-4.1/devel/sage/sage/combinat/words/morphism.py", line 618:
     sage: n.extend_by(m)
Expected:
     Morphism from Words over Ordered Alphabet ['a', 'b', 0, 1] to Words over Ordered Alphabet ['a', 'b', 0, 1, 5]
Got:
     Morphism from Words over Ordered Alphabet [0, 1, 'a', 'b'] to Words over Ordered Alphabet [0, 1, 5, 'a', 'b']
**********************************************************************
1 items had failures:
    2 of  10 in __main__.example_11
***Test Failed*** 2 failures.
For whitespace errors, see the file /home/jaap/Download/sage-4.1/tmp/.doctest_morphism.py
         [3.2 s]
exit code: 1024

Jaap 

Attachments (1)

trac_6593-word-morphism-doctest-sl.patch (1.5 KB) - added by Sébastien Labbé 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Sébastien Labbé

comment:1 Changed 13 years ago by Sébastien Labbé

Cc: Jaap Spies added
Status: newassigned
Summary: WordMorphism: doctest failure in Fedora[with patch, needs review] WordMorphism: doctest failure in Fedora

comment:2 Changed 13 years ago by Sébastien Labbé

The patch simply use the print statement which call the __str__ instead of __repr__. The __str__ sorts the string enumeration before printing it so that it should print the same way on Fedora or on other system.

comment:3 Changed 13 years ago by Jaap Spies

Reviewers: Jaap Spies
Summary: [with patch, needs review] WordMorphism: doctest failure in Fedora[with patch, positive review] WordMorphism: doctest failure in Fedora

After applying the patch in Fedora 11, 32 bit:

[jaap@paix sage-4.1.1.alpha0]$ ./sage -t "devel/sage/sage/combinat/words/morphism.py"
sage -t  "devel/sage/sage/combinat/words/morphism.py"       
	 [4.9 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 4.9 seconds

Jaap

comment:4 Changed 13 years ago by Minh Van Nguyen

Authors: Sebastien Labbe
Merged in: Sage 4.1.1.alpha1
Resolution: fixed
Status: assignedclosed

comment:5 Changed 7 years ago by Frédéric Chapoton

Authors: Sebastien LabbeSébastien Labbé
Report Upstream: N/A
Note: See TracTickets for help on using tickets.