On Thu, Aug 1, 2013 at 5:49 PM, davidp <davide...@gmail.com> wrote: > I have a file called hyperplane_arrangement.py in my home directory, and > when I run > > sage -t hyperplane_arrangement.py >
Here, probably the full sage library is imported first, e.g., "from sage.all import *". > from my home directory, all tests pass. The same file appears in the > directory SAGEHOME/devel/sage-test/sage/geometry. If I cd into that > directory and run sage -t hyperplane_arrangement.py, many tests don't pass. > (I diff-ed the files, and they are identical.) > > The problem seems to be that a certain helper class "AffineSubspace" in > hyperplane_arrangement.py is not being imported in the latter case. > > Could someone please explain what is happening? Here, *nothing* that you don't explicitly import is imported. The assumption when you test code in the sage library is that it is part of the sage library. It makes no sense to assume that the entire sage library has been imported when testing code that is part of the Sage library... because one runs into a circular dependency situation. You'll have to manually identify what parts of "from sage.all import *" your code uses, and explicitly import it in your code. William > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/groups/opt_out. > > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.