Tim Peters
711bf30b89
Patch #1475231 : add a new SKIP doctest option, thanks to
...
Edward Loper.
2006-04-25 03:31:36 +00:00
Phillip J. Eby
4703211080
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
...
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects. Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Georg Brandl
ecf93c765c
Fix test cases for doctest.
2005-06-26 23:09:51 +00:00
Georg Brandl
1f149642c9
bug [ 1172785 ] doctest.script_from_examples() result sometimes un-exec-able
2005-06-26 22:22:31 +00:00
Tim Peters
b7e99b642f
SF patch 1167316: doctest.py fails self-test if run directly.
...
Patch by Ilya Sandler.
Bugfix candidate.
2005-03-28 23:50:54 +00:00
Fred Drake
7c404a4bf7
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
2004-12-21 23:46:34 +00:00
Tim Peters
7960bf9c00
And delete a useless comment.
2004-11-08 22:31:09 +00:00
Tim Peters
d7bbbbc594
_OutputRedirectingPdb.trace_dispatch(): Return the base class's
...
trace_dispatch() result in a more obvious, and more robust way.
2004-11-08 22:30:28 +00:00
Tim Peters
50c6bdb1d6
test_doctest.py test_pdb_set_trace_nested(): A new test from Jim Fulton
...
showing that doctest's pdb.set_trace() support was dramatically broken.
doctest.py _OutputRedirectingPdb.trace_dispatch(): Return a local trace
function instead of (implicitly) None. Else interaction with pdb was
bizarre, noticing only 'call' events. Amazingly, the existing set_trace()
tests didn't care.
2004-11-08 22:07:37 +00:00
Jim Fulton
7d428788e1
Fixed a small bug. doctest didn't handle unicode docstrings containing
...
non-ascii characters.
2004-10-13 14:15:32 +00:00
Edward Loper
7d88a58e85
Reverted the addition of a NORMALIZE_NUMBERS option, per Tim Peter's
...
request. Tim says that "correct 'fuzzy' comparison of floats cannot
be automated." (The motivation behind adding the new option
was verifying interactive examples in Python's latex documentation;
several such examples use numbers that don't print consistently on
different platforms.)
2004-09-28 05:50:57 +00:00
Edward Loper
aec3c9b54f
Added a new NORMALIZE_NUMBERS option, which causes number literals in
...
the expected output to match corresponding number literals in the
actual output if their values are equal (to ten digits of precision).
2004-09-28 04:29:57 +00:00
Edward Loper
498a1868e7
- Added a "parser" option to testfile() and DocFileTest().
2004-09-27 03:42:58 +00:00
Tim Peters
3afaaf2487
Removed debug_script from the public API: no docs, not public. I'm in
...
the process of writing docs for the other "missing" debug support
functions.
2004-09-26 03:50:06 +00:00
Tim Peters
9d02a7cfa0
Add set_unittest_reportflags() to the public API. Docs will follow
...
"soon", after I repair the LaTeX I somehow damaged.
2004-09-26 01:50:24 +00:00
Tim Peters
261b28aac6
Removed two undocumented unittest support classes, and one undocumented
...
unittest support function, from the public interface. If they're not
documented, they shouldn't be public.
2004-09-26 01:24:23 +00:00
Tim Peters
48983fc484
Removed most of the module docstring. There's too much to explain now,
...
and the LaTeX docs are in increasingly good shape.
2004-09-25 02:41:28 +00:00
Edward Loper
a2fc7ec80a
- Minor docstring fixes.
...
- Simplified code to find names for file-based tests.
2004-09-21 03:24:24 +00:00
Tim Peters
bab3e99689
Whitespace normalization.
2004-09-20 19:52:34 +00:00
Edward Loper
052d0cd291
- Added "testfile" function, a simple function for running & verifying
...
all examples in a given text file. (analagous to "testmod")
- Minor docstring fixes.
- Added module_relative parameter to DocTestFile/DocTestSuite, which
controls whether paths are module-relative & os-independent, or
os-specific.
2004-09-19 17:19:33 +00:00
Edward Loper
0273f5b6b2
In DocFileTest:
...
- Fixed bug in handling of absolute paths.
- If run from an interactive session, make paths relative to the
directory containing sys.argv[0] (since __main__ doesn't have
a __file__ attribute).
2004-09-18 20:27:04 +00:00
Tim Peters
958cc89037
exclude_empty: make the default True for DocTestFinder, and introduce it
...
with default False for testmod(). The real point of introducing this was
so that output from doctest.master.summarize() would be the same as in
2.3, and doctest.master in 2.4 is a backward-compatability hack used only
by testmod().
2004-09-13 14:53:28 +00:00
Edward Loper
32ddbf7fab
Added new parameter exclude_empty to DocTestFinder.__init__, which
...
controls whether tests are included for objects with empty docstrings.
Defaults to True, to match the behavior of Python 2.3.
2004-09-13 05:47:24 +00:00
Tim Peters
c56847878e
DocTestFinder._find(): for tests derived from a module __test__ global,
...
doctest always promised to stick "__test__" in the name. That got
broken. Now it's fixed again.
2004-09-13 01:07:12 +00:00
Tim Peters
82076ef194
Reluctantly, rehabilitate doctest.master.
2004-09-13 00:52:51 +00:00