Opened 15 years ago
Closed 15 years ago
#2934 closed defect (fixed)
[with patch; positive review] doctesting files outside of sage repo is completely broken!!
Reported by: | was | Owned by: | failure |
---|---|---|---|
Priority: | blocker | Milestone: | sage-3.0 |
Component: | doctest coverage | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
On Tue, Apr 15, 2008 at 9:11 AM, Jason Bandlow <> wrote: > > Hello all, > > Regarding doctesting, I'd like to work with the following setup: > 1. Create a file work.sage (or work.py) somewhere in my home directory. > 2. Start a notebook session, and attach work.sage. > 3. Use the notebook for generating and staring at data, while using a > text editor to modify my code. > 4. Periodically run: $ sage -t work.sage to make sure that I > haven't completely fouled things up. > > Step 4 seems not to work (on Sage 2.11 on Ubuntu). For example, > I created the following file, foo.py, in my ~/.sage directory: > > def foo(x): > r""" > Shows how doctests don't work. > > EXAMPLES: > sage: 2+2 > 5 > sage: foo(3) > 4 > """ > print(x) > > And then > $ sage -t --verbose ~/.sage/foo.py > > ---------------------------------------------------------------------- > All tests passed! > Total time for all tests: 0.0 seconds > > $ sage -coverage ~/.sage/foo.py > ---------------------------------------------------------------------- > foo.py > SCORE foo.py: 100% (1 of 1) > ---------------------------------------------------------------------- > > > Can someone explain to me what's going on here? Somebody (I don't want to name names; maybe it is me?) has completely broken doctesting of user files, evidently. There has been a lot of changes made to the doctesting system recently, and I don't know which thing caused the above very serious problems. Even doctesting a pure .py file is broken! teragon:.sage was$ more foo.py def foo(x): r""" Shows how doctests don't work. EXAMPLES: sage: 2+2 5 sage: foo(3) 4 """ print(x) teragon:.sage was$ sage -t foo.py ---------------------------------------------------------------------- All tests passed! Total time for all tests: 0.0 seconds -- William
Attachments (1)
Change History (8)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
mhansen -- you're right, this problem only occurs when the filename is in a directory starting with a .dot. E.g., in my test above I was in $HOME/.sage.
comment:4 Changed 15 years ago by
Milestone: | sage-3.0.1 → sage-3.0 |
---|
comment:5 Changed 15 years ago by
Summary: | doctesting files outside of sage repo is completely broken!! → [with patch; needs review] doctesting files outside of sage repo is completely broken!! |
---|
The attached patch scripts-2934.patch enables doctesting in hidden directories. This used to be disabled since we kept lots of temp data in ./doctest -- but now we don't do to some nice changes made by Timothy Abbot.
comment:6 Changed 15 years ago by
Summary: | [with patch; needs review] doctesting files outside of sage repo is completely broken!! → [with patch; positive review] doctesting files outside of sage repo is completely broken!! |
---|
Looks good to me and fixes the problem.
Note: See
TracTickets for help on using
tickets.
I can only reproduce this when the .py file is in a directory starting with a "."