[sage-support] Re: problem running sage -t

2009-06-04 Thread Marshall Hampton

What happens if you rename it sandpile.py?  I'm not sure that will
help but there are some funny differences between running .py
and .sage files.

-Marshall

On Jun 2, 8:35 pm, davidp dav...@reed.edu wrote:
 I would like to run the doctests in my file, sandpile.sage, but get
 the following error message:

 ++===
 xyzzy sage -t sandpile.sage
 sage -t  sandpile.sage
 /usr/local/sage-devel/local/bin/sage-preparse: File file_name is
 missing
 Traceback (most recent call last):
   File ./sandpile.py, line 18, in module
 from sandpile import *
   File /home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py,
 line 167, in module
 class Sandpile(DiGraph):
 NameError: name 'DiGraph' is not defined

  [1.6 s]
 exit code: 1024

 --
 The following tests failed:

 sage -t  sandpile.sage
 Total time for all tests: 1.6 seconds
 ++

 I tried adding

 from sage.graphs.graph import DiGraph

 to the file but got the same error message.

 Any suggestions?

 Thanks,
 Dave
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problem running sage -t

2009-06-04 Thread davidp

Same problem:

sage -t  sandpile.py
Traceback (most recent call last):
  File ./sandpile.py, line 18, in module
from sandpile import *
  File /home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py,
line 167, in module
class Sandpile(DiGraph):
NameError: name 'DiGraph' is not defined

 [1.4 s]
exit code: 1024

--
The following tests failed:


sage -t  sandpile.py
Total time for all tests: 1.4 seconds


On Jun 4, 2:46 pm, Marshall Hampton hampto...@gmail.com wrote:
 What happens if you rename it sandpile.py?  I'm not sure that will
 help but there are some funny differences between running .py
 and .sage files.

 -Marshall

 On Jun 2, 8:35 pm, davidp dav...@reed.edu wrote:

  I would like to run the doctests in my file, sandpile.sage, but get
  the following error message:

  ++===
  xyzzy sage -t sandpile.sage
  sage -t  sandpile.sage
  /usr/local/sage-devel/local/bin/sage-preparse: File file_name is
  missing
  Traceback (most recent call last):
    File ./sandpile.py, line 18, in module
      from sandpile import *
    File /home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py,
  line 167, in module
      class Sandpile(DiGraph):
  NameError: name 'DiGraph' is not defined

           [1.6 s]
  exit code: 1024

  --
  The following tests failed:

          sage -t  sandpile.sage
  Total time for all tests: 1.6 seconds
  ++

  I tried adding

      from sage.graphs.graph import DiGraph

  to the file but got the same error message.

  Any suggestions?

  Thanks,
  Dave
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problem running sage -t

2009-06-04 Thread Marshall Hampton

If you email me your sandpile.sage file I could try to figure it out.
I made a file with a class definition inheriting from DiGraph and
everything tested OK, so I can't reproduce this.  The only thing I can
think of is that perhaps your command sage is calling an older
version of sage that doesn't have DiGraphs - ?  I don't know the graph
theory code well enough to know how likely that is.

Cheers,
Marshall

On Jun 4, 4:46 pm, Marshall Hampton hampto...@gmail.com wrote:
 What happens if you rename it sandpile.py?  I'm not sure that will
 help but there are some funny differences between running .py
 and .sage files.

 -Marshall

 On Jun 2, 8:35 pm, davidp dav...@reed.edu wrote:

  I would like to run the doctests in my file, sandpile.sage, but get
  the following error message:

  ++===
  xyzzy sage -t sandpile.sage
  sage -t  sandpile.sage
  /usr/local/sage-devel/local/bin/sage-preparse: File file_name is
  missing
  Traceback (most recent call last):
    File ./sandpile.py, line 18, in module
      from sandpile import *
    File /home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py,
  line 167, in module
      class Sandpile(DiGraph):
  NameError: name 'DiGraph' is not defined

           [1.6 s]
  exit code: 1024

  --
  The following tests failed:

          sage -t  sandpile.sage
  Total time for all tests: 1.6 seconds
  ++

  I tried adding

      from sage.graphs.graph import DiGraph

  to the file but got the same error message.

  Any suggestions?

  Thanks,
  Dave
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---