Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5902 closed enhancement (fixed)

[with patch, positive review] Try SAGE_ROOT as base of argument to "sage -t"

Reported by: tabbott Owned by: mhansen
Priority: minor Milestone: sage-4.1
Component: doctest coverage Keywords:
Cc: Merged in: sage-4.1.alpha3
Authors: Tim Abbott Reviewers: Mike Hansen
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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.

Attachments (1)

sage_scripts-sage-test-path.patch (829 bytes) - added by tabbott 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by tabbott

comment:1 Changed 13 years ago by mhansen

  • Owner changed from mabshoff to mhansen
  • Status changed from new to assigned
  • Summary changed from [with patch, needs review] Try SAGE_ROOT as base of argument to "sage -t" to [with patch, positive review] Try SAGE_ROOT as base of argument to "sage -t"

Looks good to me!

comment:2 Changed 13 years ago by mhansen

  • Authors set to Tim Abbott
  • Reviewers set to Mike Hansen

comment:3 Changed 13 years ago by was

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.

comment:4 Changed 13 years ago by tabbott

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.

comment:5 Changed 13 years ago by boothby

  • Merged in set to sage-4.1.alpha2
  • Resolution set to fixed
  • Status changed from assigned to closed

comment:6 Changed 13 years ago by rlm

  • Merged in changed from sage-4.1.alpha2 to sage-4.1.alpha3
Note: See TracTickets for help on using tickets.