New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One doctest in cmdline.py is too touchy with respect to the shebang #14365
Comments
Patch |
comment:1
Attachment: cmdline.patch.gz |
Reviewer: Leif Leonhardy |
comment:2
Well, your patch doesn't really fit
Furthermore, for Sage-on-foo, there might not even be a |
Changed keywords from none to packaging |
Author: Julien Puydt |
comment:3
Should I rewrite the patch to just remove that test? |
comment:4
Replying to @SnarkBoojum:
Just take another script from Why at all did the test fail for you? |
comment:5
In debian, ipython starts with:
|
comment:6
Replying to @SnarkBoojum:
Which is just stupid. Orthogonal to that, why should Debian's |
comment:7
But has in sage-on-gentoo SAGE_LOCAL is probably set to /usr. cmdline.py is full of stuff that fail on sage-on-gentoo a lot of them we just don't really think of fixing. |
comment:8
Replying to @kiwifb:
IMHO Sage just shouldn't contain such too specific tests. |
comment:9
Sage contains :
The first are important. The others wouldn't be a problem if they were all in the same file, which distributions could then not package and not suffer through. But they're scattered everywhere! |
comment:10
Just for fun that's what fails in sage-on-gentoo after we patch most of what we care of
I'd like to dig the problem with the value from "ret" in 2 tests. The sqlalchemy tests really duplicate testing in another part of sage I am sure. My solution for that will be to eventually remove it surgically since the only sage spkg handling functionality that it is working and intend to keep is to produce spkg. |
comment:11
Oh, that one:
I have two like this in cmdline.py and another one in control.py. And I have a few other places where sage expects an error and doesn't... like a place where it deliberately asks something about a polytope in dimension 7 to a palp program which is supposed to work in dimension at most 6... as debian's (future) palp package goes up to eleven [because sage goes as far], the test fails because the computation actually works. But let's get back to this ticket : what do you propose it should test? I don't think there is such a thing as "another script from $SAGE_LOCAL/bin/ which is unlikely to use some system-wide version / differ in "repackaged" Sage releases" as Leif put it... |
comment:12
To be brutally honest this file probably can be completely dropped from a binary distro. It is only testing that the various options of the sage command line behave as expected. There is no functionality in here. |
comment:13
The patch simply destroys the whole point of the test, so it surely isn't acceptable. |
comment:14
Replying to @SnarkBoojum:
That's because upstream Python very stupidly refuses to add a patch fixing an important security issue. |
comment:15
Replying to @SnarkBoojum:
In reality there is also a lot of The test that this ticket is about is such a test. If it was only type 2 we could just remove it. But it's really meant as a test of type 1, namely that |
comment:16
Actually that's one of the tests we now keep in sage-on-gentoo and I don't really have a problem with it - lucky. For a binary distro you may want to drop some tests. I don't see the point in shipping and testing sage-location in that particular case. I am not talking about a bdist, I am talking about something installed by your distro package manager. |
comment:17
Well that's interesting, I will drop the test in question shortly from sage-on-gentoo. We now have
which comes from the new way to handle multiple simultaneous python install at the time in Gentoo. Like I said, it won't be missed if it just test that sage-relocation did its work. We don't do that in sage-on-gentoo anyway. And I am sure you don't want to do that either in a debian package that install sage as part of the system. While it would be nice to have sage upstream completely distro friendly, there are some divergences at the moment because of slightly different objectives. I am absolutely ready to review this as invalid. As long as sage upstream support something like "sage-relocation" it will make sense to test it. And it won't ever for a project like sage-on-foo. If you have a sure to work, in both world, alternative to the test I would be ok with it. In the meantime I am not really willing to spend much time on it. |
comment:22
All of this discussion is outdated : debian will patch out any test which doesn't make sense. I suggest to close as invalid/outdated/obsolete (whatever the trac name is), thanks. |
comment:23
Set to invalid. |
Changed reviewer from Leif Leonhardy to François Bissey, Julien Puydt |
comment:24
Replying to @kiwifb:
I'm interpreting this as " |
In cmdline.py, one of the doctest checks the exact shebang of ipython ; the attached patch checks there is a shebang trying to run python, but doesn't check exactly how python is run.
CC: @kiwifb
Component: doctest coverage
Keywords: packaging
Author: Julien Puydt
Reviewer: François Bissey, Julien Puydt
Issue created by migration from https://trac.sagemath.org/ticket/14365
The text was updated successfully, but these errors were encountered: