Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctest extraction with python2.4 #26

Closed
fipymigrate opened this issue Sep 19, 2014 · 1 comment
Closed

doctest extraction with python2.4 #26

fipymigrate opened this issue Sep 19, 2014 · 1 comment

Comments

@fipymigrate
Copy link

Get the following error when running examples with python2.4: $ python2.4 examples/diffusion/steadyState/mesh1D/input.py Traceback (most recent call last): File &examples/diffusion/steadyState/mesh1D/input.py&, line 204, in ? exec(fipy.tests.doctestPlus.getScript()) File &/home/skupskyr/python/fipy/fipy/tests/doctestPlus.py&, line 50, in getScript return doctest.testsource(sys.modules.get(name), &&) File &/usr/local/lib/python2.4/doctest.py&, line 2510, in testsource raise ValueError(name, &not found in tests&) ValueError: ('', 'not found in tests')

Imported from trac ticket #26, created by nobody on 02-10-2005 at 16:18, last modified: 03-29-2005 at 16:49

@guyer
Copy link
Member

guyer commented Sep 19, 2014

Logged In: YES user_id=121894 There were a couple of problems. The syntax for doctest.testsource() changed significantly between Python 2.3 and 2.4; a blank name no longer equates to the module as a whole. Secondly, doctest no longer strips out comments, and the returned script doesn't always end in '\n', which is documented to be required by compile() (although not by exec). Filed a Python bug: <http://sourceforge.net/tracker/index.php? func=detail&aid=1172785&group_id=5470&atid=105470&gt;

Trac comment by jguyer on 03-29-2005 at 16:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants