#17814: Make calling a cached method independent of source code inspection
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.6
Component: distribution | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/SimonKing/make_calling_a_cached_method_independent_of_source_code_inspection|
a0b829dc10b4ccb00b99e073de8a1c0006aa1e51
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:44 SimonKing]:
> The test itself is obtained from a temporary copy of the file, if I
recall correctly.
That's no longer true (but the test is read before it is executed, so
that's not the issue).
> One might think of writing a test that renames the original source file,
then does the test, and moves the source file back. Of course, it will
only work if the user has write permission.
Doctests should never write anything below `SAGE_ROOT` and your proposal
will break badly if the test is interrupted at the wrong moment (you could
try something with `try`/`finally` but still it's dangerous). Also, you
will get race conditions (imagine you're editing the file while the test
is running).
--
Ticket URL: <http://trac.sagemath.org/ticket/17814#comment:46>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.