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

Restore doctesting of non-library files #12704

Closed
sagetrac-fwclarke mannequin opened this issue Mar 20, 2012 · 7 comments
Closed

Restore doctesting of non-library files #12704

sagetrac-fwclarke mannequin opened this issue Mar 20, 2012 · 7 comments

Comments

@sagetrac-fwclarke
Copy link
Mannequin

sagetrac-fwclarke mannequin commented Mar 20, 2012

Since #9739, it has not been possible to doctest non-library files (if, as is likely, they contain definitions which get tested). This is because in sage-doctest the same name is used for:

  1. the python file which is created in SAGE_TESTDIR (a copy of, or a preparsed version of, the file being tested), and
  2. the file which loads the previous file and contains the extracted doctests.

As a result, the first file is overwritten by the second, and then loads itself. Thus definitions from the original file are not available to the doctests.

CC: @jhpalmieri

Component: doctest coverage

Reviewer: Francis Clarke

Issue created by migration from https://trac.sagemath.org/ticket/12704

@sagetrac-fwclarke sagetrac-fwclarke mannequin added this to the sage-5.0 milestone Mar 20, 2012
@sagetrac-fwclarke
Copy link
Mannequin Author

sagetrac-fwclarke mannequin commented Mar 20, 2012

comment:1

Attachment: trac_12704-doctest_non-library_files.patch.gz

The one-line patch solves the problem.

@sagetrac-fwclarke
Copy link
Mannequin Author

sagetrac-fwclarke mannequin commented Mar 20, 2012

Author: Francis Clarke

@jhpalmieri
Copy link
Member

comment:2

I think this is a duplicate of #12069.

@sagetrac-fwclarke
Copy link
Mannequin Author

sagetrac-fwclarke mannequin commented Mar 21, 2012

comment:3

Replying to @jhpalmieri:

I think this is a duplicate of #12069 .

Indeed, it is; it should be closed.

Sorry for missing #12069, which does a more thorough job. Perhaps it should be added to #11337.

@sagetrac-fwclarke sagetrac-fwclarke mannequin removed this from the sage-5.0 milestone Mar 21, 2012
@jhpalmieri
Copy link
Member

comment:4

I just added #12069 to #11337.

@jdemeyer
Copy link

Reviewer: Francis Clarke

@jdemeyer
Copy link

Changed author from Francis Clarke to none

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

No branches or pull requests

2 participants