#12136: FVS function in DiGraph returns [0] instead of [] if already directed
acyclic
-----------------------------+----------------------------------------------
Reporter: fichtejo | Owner: tbd
Type: defect | Status: needs_work
Priority: trivial | Milestone: sage-4.8
Component: PLEASE CHANGE | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by ncohen):
* status: needs_review => needs_work
Comment:
Helloooooo !
This patch still needs work ! The doctests do not pass, which is natural
as the patch changes the output :
{{{
~/.Sage/devel/sage-3/sage/graphs$ sage -b 3 && sage -t digraph.py
----------------------------------------------------------
sage: Building and installing modified Sage library files.
Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Execute 0 commands (using 0 threads)
Time to execute 0 commands: 0.0638999938965 seconds
Finished compiling Cython code (time = 0.567146062851 seconds)
running install
running build
running build_py
running build_ext
Execute 0 commands (using 0 threads)
Time to execute 0 commands: 0.00891304016113 seconds
Total time spent compiling C/C++ extensions: 0.0494360923767 seconds.
running install_lib
running install_egg_info
Removing /home/ncohen/.Sage/local/lib/python2.6/site-
packages/sage-0.0.0-py2.6.egg-info
Writing /home/ncohen/.Sage/local/lib/python2.6/site-
packages/sage-0.0.0-py2.6.egg-info
real 0m1.676s
user 0m1.360s
sys 0m0.192s
sage -t "devel/sage-3/sage/graphs/digraph.py"
**********************************************************************
File "/home/ncohen/.Sage/devel/sage-3/sage/graphs/digraph.py", line 1547:
sage: feedback.cardinality()
Exception raised:
Traceback (most recent call last):
File "/home/ncohen/.Sage/local/bin/ncadoctest.py", line 1231, in
run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/ncohen/.Sage/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/ncohen/.Sage/local/bin/ncadoctest.py", line 1172, in
run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_23[6]>", line 1, in <module>
feedback.cardinality()###line 1547:
sage: feedback.cardinality()
AttributeError: 'list' object has no attribute 'cardinality'
**********************************************************************
1 items had failures:
1 of 16 in __main__.example_23
***Test Failed*** 1 failures.
For whitespace errors, see the file /home/ncohen/.sage/tmp/digraph_2592.py
[9.4 s]
----------------------------------------------------------------------
The following tests failed:
sage -t "devel/sage-3/sage/graphs/digraph.py"
Total time for all tests: 9.4 seconds
~/.Sage/devel/sage-3/sage/graphs$
}}}
Besides, the documentation should also be updated, as it would otherwise
keep claiming that the method returns a set when it is actually a list.
It's true that it's a bit complicated at first to think of everything, but
unless we do it immediately we would have to create more patches
afterwards to fix these problems... The next version should be good,
though ! `;-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12136#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.