Testing the code

asked 2021-03-17 19:23:57 +0100

Blue sky gravatar image

updated 2021-03-18 00:33:44 +0100

slelievre gravatar image

I was told that one can use sage -t namefile.py to test some code.

When I used the code, I got the following thing that is not what I want

/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
  File "/usr/share/sagemath/bin/sage-runtests", line 178, in <module>
    DC = DocTestController(options, args)
  File "/usr/lib/python3/dist-packages/sage/doctest/control.py", line 358, in __init__
    for pkg in list_packages('optional', local=True).values():
  File "/usr/lib/python3/dist-packages/sage/misc/package.py", line 236, in list_packages
    for p in os.listdir(SAGE_PKGS):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/sagemath/build/pkgs'
edit retag flag offensive close merge delete