Why choose doctests with multiple possible solutions?
> seriously. But to go into the details with each failing test takes
> time and is tedious, so I think it is better to avoid possible
> problems (like those with the multible solutions) whenever possible.
Yepyep. All that needs to be fixed :-)
> I fully agree - is it okay if I create a "track ticket" for this? I
> haven't done this before but I think I'll manage.
Please do ! And if you see the "cc" field in the Trac form, please add
my username (ncohen) inside :-)
> I will look into this error again try to give more details
Thaaaaaanks !
> My issue with sandpile.py is closely related to the issues with gyle &
> ryler. I think there is lot's of double testing of the same
> functionality.
Gyle & ryler ? Gale Ryser ?
Gale Ryser problem's also comes from GLPK !
> If I got it right a possible solution would be to include some TEST
> sections which doctest the functionality once (S.betti ...), then
> the bunch of the other examples would be ignored?
Yep, especially in this case where the tests are not present to test
Sage but rather to explain things to the users. Complicating them
would make the bugs vanish, but if the users do not get what it means
anymore then there's no point. So it would be better in this case to
write doctests only for the user, and to put the real tests elsewhere,
or at the end of the document.
> I am aware that those are minor issues, but if building sage on a
> stock PC they might cause some confusion and extra detective work.
> Does this qualify to file a bug or open an issue on trac?
Anything that makes the doctests scream qualifies as a bug. Anything
that is not even a bug but that is not the behaviour you expected also
qualifies as a bug, even though it may just mean rewriting some
documentation :-)
Thanks for your help !
Nathann
I checked that the directory was created and the permissions were set
to 0000 correctly.
Is this critical or can it be fixed with some sort of setting?
EDIT: I found the culprit - I ran doctest as root.
If I run the doctest as restricted user I get the correct OSError
message.
Not to mention that all free softwares are distributed with the
warning "You use this code at your own risk" and that we never had any
fun with it. What's the point then ? :-p
Nathann_also_known_as_root_on_#sagemath
> doctest failure in linear_programming.rst:
> http://trac.sagemath.org/sage_trac/ticket/12019
This ticket is now waiting for a review.
> failing doctest in integer_vector.py (gale ryser theorem)
> http://trac.sagemath.org/sage_trac/ticket/12022
Same here. And these tickets could not be shorter :-)
Nathann
I applied the patch and it passes doctest - great !.
I changed status to positiv review.
check also system information appended at ticket 12019, and the
processor information in 12022.
The system is maybe not so uncommon - it is the Live CD base
distribution which had approx 2000 Downloads from the sage mirrors
this year.
hurray for those two patches - what do you think about the others?
About the sandpile.py doctests - I could try to write a patch myself
which is similar to the one you wrote (ad the # not tested flag to
some of the multiple calls I mentioned in the first post. I am sure
sandpile.py running out of time is not uncommon at all.
The one with the root issue is trickier - is it save to flag it as not
tested or is there some option to make a doctest conditional (e.g. if
UID = 0 then # not tested) ?
I just opened a ticket for the last one (crash in digraph.py).
http://trac.sagemath.org/sage_trac/ticket/12054
thanks
emil
this would probably be the right thing to do :-)! So you think it is
better to add it somewhere on the top level, or should I just take
this code and apply at the place where it fails?
it is in:
devel/sage/sage/structure/sage_object.pyx, line 1042:
Well, I certainly agree that running doctests as root is not very
clever, I don't think we should *prevent* anyone from doing that.
A tangentially related remark, I do not recommend that in a
system-wide install, then person
installing has to be root. For example, I have Sage installs
systemwide on sage.math (and the other *.math) computers, but I made
them by creating a /usr/local/sage directory (as root), and making
that
directory owned by the user wstein. Then everything else related to
the system-wide Sage install is done as the user "wstein". I
consider this safer.
- William
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
I have written a patch with this code - it throws no error message any
more.
http://trac.sagemath.org/sage_trac/ticket/12021
I have also flagged several doctests in sandpile.py as # long time
patch is in http://trac.sagemath.org/sage_trac/ticket/12023
Those were my first tries with hg and creating patches so I would be
grateful if somebody could comment if those submissions and entries
are OK or if I made some serious blunders.