Skip to content
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

Try SAGE_ROOT as base of argument to "sage -t" #5902

Closed
timabbott opened this issue Apr 26, 2009 · 7 comments
Closed

Try SAGE_ROOT as base of argument to "sage -t" #5902

timabbott opened this issue Apr 26, 2009 · 7 comments

Comments

@timabbott
Copy link
Contributor

Running

sage -t devel/sage/sage/rings/polynomial/pbori.pyx

seems to not work for me sometimes when the current working directory is not SAGE_ROOT. I don't really understand what is going wrong here, since there is a "cd" in $SAGE_ROOT/sage, but I've heard other people complain about issues with this.

The attached patch caused the problems to go away for me.

Component: doctest coverage

Author: Tim Abbott

Reviewer: Mike Hansen

Merged: sage-4.1.alpha3

Issue created by migration from https://trac.sagemath.org/ticket/5902

@mwhansen
Copy link
Contributor

comment:1

Attachment: sage_scripts-sage-test-path.patch.gz

Looks good to me!

@mwhansen
Copy link
Contributor

Author: Tim Abbott

@mwhansen
Copy link
Contributor

Reviewer: Mike Hansen

@williamstein
Copy link
Contributor

comment:3

Running

sage -t devel/sage/sage/rings/polynomial/pbori.pyx

seems to not work for me sometimes when the current working directory is not SAGE_ROOT.

It should not work. "sage -t" is supposed to take the path to a file. If you're not in SAGE_ROOT, then devel/sage/sage/rings/polynomial/pbori.pyx is not a file. It's like with any other unix command. E.g., you wouldn't expect

cat devel/sage/sage/rings/polynomial/pbori.pyx

to magically work if you're not in SAGE_ROOT.

Note that Mike Hansen just gave this a positive review. I strongly disagree.

@timabbott
Copy link
Contributor Author

comment:4

Hi William,

My motivation for this change was that when you run "sage -testall", for each test it prints out what it is running as

sage -t devel/sage/sage/rings/polynomial/pbori.py

since $SAGE_ROOT/sage changes directory to SAGE_ROOT before proceeding.

So that if you copy-and-paste that output from "sage -testall" to run the test a second time, it doesn't work.

@boothby
Copy link

boothby commented Jun 26, 2009

Merged: sage-4.1.alpha2

@boothby boothby closed this as completed Jun 26, 2009
@rlmill
Copy link
Mannequin

rlmill mannequin commented Jun 29, 2009

Changed merged from sage-4.1.alpha2 to sage-4.1.alpha3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants