#5308: [with patch, needs work] Removing __len__ for combinatorial classes
(depend
on #5200,#4549)
---------------------------+------------------------------------------------
Reporter: hivert | Owner: hivert
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.4.1
Component: combinatorics | Keywords: __len__, count, combinatorial class
---------------------------+------------------------------------------------
Comment(by mabshoff):
This patch introduces two trivial to fix doctest failures:
{{{
mabsh...@sage:/scratch/mabshoff/sage-3.4.1.rc0$ ./sage -t -long
devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py
sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py"
**********************************************************************
File
"/scratch/mabshoff/sage-3.4.1.rc0/devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py",
line 911:
sage: I.dimension()
Expected:
verbose 0 (...: multi_polynomial_ideal.py, dimension) Warning: falling
back to very slow toy implementation.
0
Got:
verbose 0 (891: multi_polynomial_ideal.py, dimension) Warning: falling
back to very slow toy implementation.
doctest:966: DeprecationWarning: The usage of iterator for
combinatorial classes is deprecated. Please use the class itself
0
**********************************************************************
1 items had failures:
1 of 15 in __main__.example_17
***Test Failed*** 1 failures.
For whitespace errors, see the file
/scratch/mabshoff/sage-3.4.1.rc0/tmp/.doctest_multi_polynomial_ideal.py
[11.3 s]
exit code: 1024
----------------------------------------------------------------------
The following tests failed:
sage -t -long
"devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py"
Total time for all tests: 11.3 seconds
mabsh...@sage:/scratch/mabshoff/sage-3.4.1.rc0$ ./sage -t -long
devel/sage/doc/en/a_tour_of_sage/index.rst
sage -t -long "devel/sage/doc/en/a_tour_of_sage/index.rst"
**********************************************************************
File
"/scratch/mabshoff/sage-3.4.1.rc0/devel/sage/doc/en/a_tour_of_sage/index.rst",
line 132:
sage: z = Partitions(10^8).count() #about 4.5 seconds
Expected nothing
Got:
doctest:1: DeprecationWarning: The usage of iterator for combinatorial
classes is deprecated. Please use the class itself
**********************************************************************
1 items had failures:
1 of 4 in __main__.example_9
***Test Failed*** 1 failures.
For whitespace errors, see the file
/scratch/mabshoff/sage-3.4.1.rc0/tmp/.doctest_index.py
[10.9 s]
exit code: 1024
}}}
Once those are fixed the positive review can be reinstated.
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5308#comment:16>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---