diff options
author | Fred Drake <fdrake@acm.org> | 2004-12-21 23:46:34 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2004-12-21 23:46:34 (GMT) |
commit | 7c404a4bf7b9061ee013bef361b6eba951218d80 (patch) | |
tree | 921da1debae9f4ac526fc818426d6ba55896bb8f /Doc/lib | |
parent | e57d7b179a6171b013030c6751e8c0999251200b (diff) | |
download | cpython-7c404a4bf7b9061ee013bef361b6eba951218d80.zip cpython-7c404a4bf7b9061ee013bef361b6eba951218d80.tar.gz cpython-7c404a4bf7b9061ee013bef361b6eba951218d80.tar.bz2 |
add __file__ to the globals available for tests loaded via DocFileSuite;
this is useful for locating supporting data files, just as it is in Python
modules
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libdoctest.tex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/lib/libdoctest.tex b/Doc/lib/libdoctest.tex index b982a73..0f32f7d 100644 --- a/Doc/lib/libdoctest.tex +++ b/Doc/lib/libdoctest.tex @@ -1107,6 +1107,10 @@ instances from text files and modules with doctests: defaults to a normal parser (i.e., \code{\class{DocTestParser}()}). \versionadded{2.4} + + Starting in Python 2.5, the global \code{__file__} was added to the + globals provided to doctests loaded from a text file using + \function{DocFileSuite()}. \end{funcdesc} \begin{funcdesc}{DocTestSuite}{\optional{module}\optional{, |