Discussion:
[sage-devel] doctest result depending on --long
'Martin R' via sage-devel
2018-11-20 16:26:17 UTC
Permalink
Dear all!

I am in need of help again. At https://trac.sagemath.org/ticket/25864 I
have a doctest whose output seems to depend on whether the option --long is
passed or not.

The doctest is in src/sage/combinat/posets/poset_examples.py:

---------------------------------------------------------------------------------
EXAMPLES::

sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
---------------------------------------------------------------------------------

I now get (with the branch on the ticket applied)

sage -t --long src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
Failed example:
P.cover_relations()
Expected nothing
Got:
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0), (1, 1)]]

versus

sage -t src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
Failed example:
P.cover_relations()
Expected nothing
Got:
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1)]]
**********************************************************************
(note that the order of the output changed)

There is one "long" doctest in the same file:
---------------------------------------------------------------------------------
sage: posets.SSTPoset([3,2]).bottom() # long time (6s on
sage.math, 2012)
[[1, 1, 1], [2, 2]]
---------------------------------------------------------------------------------

If I remove the long from there, the difference goes away, and I get the
"long" version.

If I run the doctest in the console, I get the "long" version.

How can I debug this?

Help is much appreciated!

Martin
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Dima Pasechnik
2018-11-20 16:28:58 UTC
Permalink
Just sort the output in the doctest...

On Tue, 20 Nov 2018 at 16:26, 'Martin R' via sage-devel <
Post by 'Martin R' via sage-devel
Dear all!
I am in need of help again. At https://trac.sagemath.org/ticket/25864 I
have a doctest whose output seems to depend on whether the option --long is
passed or not.
---------------------------------------------------------------------------------
sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
---------------------------------------------------------------------------------
I now get (with the branch on the ticket applied)
sage -t --long src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0), (1, 1)]]
versus
sage -t src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1)]]
**********************************************************************
(note that the order of the output changed)
---------------------------------------------------------------------------------
sage: posets.SSTPoset([3,2]).bottom() # long time (6s on
sage.math, 2012)
[[1, 1, 1], [2, 2]]
---------------------------------------------------------------------------------
If I remove the long from there, the difference goes away, and I get the
"long" version.
If I run the doctest in the console, I get the "long" version.
How can I debug this?
Help is much appreciated!
Martin
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Frédéric Chapoton
2018-11-20 16:40:56 UTC
Permalink
known issue, see https://trac.sagemath.org/ticket/26586

F
Post by 'Martin R' via sage-devel
Dear all!
I am in need of help again. At https://trac.sagemath.org/ticket/25864 I
have a doctest whose output seems to depend on whether the option --long is
passed or not.
---------------------------------------------------------------------------------
sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
---------------------------------------------------------------------------------
I now get (with the branch on the ticket applied)
sage -t --long src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0), (1, 1)]]
versus
sage -t src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1)]]
**********************************************************************
(note that the order of the output changed)
---------------------------------------------------------------------------------
sage: posets.SSTPoset([3,2]).bottom() # long time (6s on
sage.math, 2012)
[[1, 1, 1], [2, 2]]
---------------------------------------------------------------------------------
If I remove the long from there, the difference goes away, and I get the
"long" version.
If I run the doctest in the console, I get the "long" version.
How can I debug this?
Help is much appreciated!
Martin
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via sage-devel
2018-11-21 19:38:20 UTC
Permalink
I think I made significant progress, but now I am in need of help.

Progress means, that I reduced the example to a dozen of lines, containing
three tests.

I am in need of help, because I have no idea why these interact.

Martin
Post by Frédéric Chapoton
known issue, see https://trac.sagemath.org/ticket/26586
F
Post by 'Martin R' via sage-devel
Dear all!
I am in need of help again. At https://trac.sagemath.org/ticket/25864 I
have a doctest whose output seems to depend on whether the option --long is
passed or not.
---------------------------------------------------------------------------------
sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
---------------------------------------------------------------------------------
I now get (with the branch on the ticket applied)
sage -t --long src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0), (1, 1)]]
versus
sage -t src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1)]]
**********************************************************************
(note that the order of the output changed)
---------------------------------------------------------------------------------
sage: posets.SSTPoset([3,2]).bottom() # long time (6s on
sage.math, 2012)
[[1, 1, 1], [2, 2]]
---------------------------------------------------------------------------------
If I remove the long from there, the difference goes away, and I get the
"long" version.
If I run the doctest in the console, I get the "long" version.
How can I debug this?
Help is much appreciated!
Martin
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via sage-devel
2018-11-21 19:38:20 UTC
Permalink
I think I made significant progress, but now I am in need of help.

Progress means, that I reduced the example to a dozen of lines, containing
three tests.

I am in need of help, because I have no idea why these interact.

Martin
Post by Frédéric Chapoton
known issue, see https://trac.sagemath.org/ticket/26586
F
Post by 'Martin R' via sage-devel
Dear all!
I am in need of help again. At https://trac.sagemath.org/ticket/25864 I
have a doctest whose output seems to depend on whether the option --long is
passed or not.
---------------------------------------------------------------------------------
sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
---------------------------------------------------------------------------------
I now get (with the branch on the ticket applied)
sage -t --long src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0), (1, 1)]]
versus
sage -t src/sage/combinat/posets/poset_examples.py
**********************************************************************
File "src/sage/combinat/posets/poset_examples.py", line 1400, in
sage.combinat.posets.poset_examples.Posets.YoungDiagramPoset
P.cover_relations()
Expected nothing
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1)]]
**********************************************************************
(note that the order of the output changed)
---------------------------------------------------------------------------------
sage: posets.SSTPoset([3,2]).bottom() # long time (6s on
sage.math, 2012)
[[1, 1, 1], [2, 2]]
---------------------------------------------------------------------------------
If I remove the long from there, the difference goes away, and I get the
"long" version.
If I run the doctest in the console, I get the "long" version.
How can I debug this?
Help is much appreciated!
Martin
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...