Opened 12 years ago

Closed 12 years ago

#1469 closed defect (wontfix)

sage-doctest should import the namespace of the file

Reported by: burcin Owned by: burcin
Priority: minor Milestone: sage-2.9
Component: doctest coverage Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The doctest script sage-doctest should try to import the namespace of the file being tested. It is not very convenient to add

from sage.foo import bar

at the beginning of every doctest in a file.

This would simplify some of the doctests in ~100 files, removing ~450 lines.

Importing the module might have an impact on the speed of the doctests.

Change History (1)

comment:1 Changed 12 years ago by burcin

  • Resolution set to wontfix
  • Status changed from new to closed
<craigcitro> let's say the user types foo?
<craigcitro> and gets the docstring for some function
<craigcitro> then since they don't see this import that you've added
<craigcitro> they can't actually run those doctests
<craigcitro> they have to modify them by adding the sage.path.to.file at the beginning
<craigcitro> which would be confusing if you've never run into it before
Note: See TracTickets for help on using tickets.