summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 83429,83436 via svnmerge fromGeorg Brandl2010-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ................ r83429 | georg.brandl | 2010-08-01 21:14:56 +0200 (So, 01 Aug 2010) | 37 lines Merged revisions 83352,83356-83358,83362,83366,83368-83369 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83352 | georg.brandl | 2010-07-31 20:11:07 +0200 (Sa, 31 Jul 2010) | 1 line #9440: Remove borderline test case that fails based on unpredictable conditions such as compiler flags. ........ r83356 | georg.brandl | 2010-07-31 21:29:15 +0200 (Sa, 31 Jul 2010) | 1 line Remove trailing whitespace. ........ r83357 | georg.brandl | 2010-07-31 21:59:55 +0200 (Sa, 31 Jul 2010) | 1 line #5778: document that sys.version can contain a newline. ........ r83358 | georg.brandl | 2010-07-31 22:05:31 +0200 (Sa, 31 Jul 2010) | 1 line #9442: do not document a specific format for sys.version; rather refer to version_info and the platform module. ........ r83362 | georg.brandl | 2010-07-31 23:12:15 +0200 (Sa, 31 Jul 2010) | 1 line #8910: add a file explaining why Lib/test/data is there. ........ r83366 | georg.brandl | 2010-07-31 23:26:40 +0200 (Sa, 31 Jul 2010) | 1 line There always is a False and True now. ........ r83368 | georg.brandl | 2010-07-31 23:40:15 +0200 (Sa, 31 Jul 2010) | 1 line #7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details. ........ r83369 | georg.brandl | 2010-07-31 23:41:42 +0200 (Sa, 31 Jul 2010) | 1 line Fix "Berkeley" name. ........ ................ r83436 | georg.brandl | 2010-08-01 21:33:15 +0200 (So, 01 Aug 2010) | 42 lines Merged revisions 83259,83261,83264-83265,83268-83269,83271-83272,83281 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83259 | georg.brandl | 2010-07-30 09:03:39 +0200 (Fr, 30 Jul 2010) | 1 line Clarification. ........ r83261 | georg.brandl | 2010-07-30 09:21:26 +0200 (Fr, 30 Jul 2010) | 1 line #9230: allow Pdb.checkline() to be called without a current frame, for setting breakpoints before starting debugging. ........ r83264 | georg.brandl | 2010-07-30 10:45:26 +0200 (Fr, 30 Jul 2010) | 1 line Document the "jump" command in pdb.__doc__, and add a version tag for "until X". ........ r83265 | georg.brandl | 2010-07-30 10:54:49 +0200 (Fr, 30 Jul 2010) | 1 line #8015: fix crash when entering an empty line for breakpoint commands. Also restore environment properly when an exception occurs during the definition of commands. ........ r83268 | georg.brandl | 2010-07-30 11:23:23 +0200 (Fr, 30 Jul 2010) | 2 lines Issue #8048: Prevent doctests from failing when sys.displayhook has been reassigned. ........ r83269 | georg.brandl | 2010-07-30 11:43:00 +0200 (Fr, 30 Jul 2010) | 1 line #6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding. ........ r83271 | georg.brandl | 2010-07-30 11:59:28 +0200 (Fr, 30 Jul 2010) | 1 line #5727: Restore the ability to use readline when calling into pdb in doctests. ........ r83272 | georg.brandl | 2010-07-30 12:29:19 +0200 (Fr, 30 Jul 2010) | 1 line #5294: Fix the behavior of pdb "continue" command when called in the top-level debugged frame. ........ r83281 | georg.brandl | 2010-07-30 15:36:43 +0200 (Fr, 30 Jul 2010) | 1 line Add myself for pdb. ........ ................
* Merged revisions 83392,83426 via svnmerge fromGeorg Brandl2010-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ................ r83392 | georg.brandl | 2010-08-01 10:22:05 +0200 (So, 01 Aug 2010) | 1 line #8471: reset _SpoofOut.buf to an empty string when truncating; if Unicode had been output previously, it had been coerced to a Unicode string, potentially making subsequent prints behave differently or raise UnicodeErrors. ................ r83426 | georg.brandl | 2010-08-01 21:06:51 +0200 (So, 01 Aug 2010) | 27 lines Merged revisions 83370,83372-83374,83384 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83370 | georg.brandl | 2010-07-31 23:51:48 +0200 (Sa, 31 Jul 2010) | 5 lines #8198: the Helper class should not save the stdin and stdout objects at import time, rather by default use the current streams like the other APIs that output help. ........ r83372 | georg.brandl | 2010-08-01 00:05:54 +0200 (So, 01 Aug 2010) | 1 line #4007: remove *.a and *.so.X.Y files in "make clean". ........ r83373 | georg.brandl | 2010-08-01 00:11:11 +0200 (So, 01 Aug 2010) | 1 line #5147: revert accidental indentation of header constant for MozillaCookieJar. ........ r83374 | georg.brandl | 2010-08-01 00:32:52 +0200 (So, 01 Aug 2010) | 1 line #5146: handle UID THREAD command correctly. ........ r83384 | georg.brandl | 2010-08-01 08:32:55 +0200 (So, 01 Aug 2010) | 1 line Build properties using lambdas. This makes test_pyclbr pass again, because it does not think that input and output are methods anymore. ........ ................
* Merged revisions 79297,79307 via svnmerge fromFlorent Xicluna2010-03-231-1/+2
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79297 | florent.xicluna | 2010-03-22 18:18:18 +0100 (lun, 22 mar 2010) | 2 lines #7668: Fix test_httpservers failure when sys.executable contains non-ASCII bytes. ........ r79307 | florent.xicluna | 2010-03-22 23:45:50 +0100 (lun, 22 mar 2010) | 2 lines #7667: Fix doctest failures with non-ASCII paths. ........
* Merged revisions 78488 via svnmerge fromFlorent Xicluna2010-02-271-2/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78488 | florent.xicluna | 2010-02-27 14:31:23 +0100 (sam, 27 fév 2010) | 2 lines Issue #1729305: Fix doctest to handle encode error with "backslashreplace". It fixes #7667 too. ........
* Issue 5021: doctest.testfile should set __name__Raymond Hettinger2009-01-271-0/+4
|
* Merged revisions 67790 via svnmerge fromNick Coghlan2008-12-151-3/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67790 | nick.coghlan | 2008-12-15 21:41:05 +1000 (Mon, 15 Dec 2008) | 1 line Issue #4197: Fix the remaining part of the doctest-in-zipfile problem by giving linecache access to the module globals when available ........
* Merged revisions ↵Georg Brandl2008-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67245,67277,67289,67295,67301-67303,67307,67330,67332,67336,67355,67359,67362,67364,67367-67368,67370 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67245 | benjamin.peterson | 2008-11-17 23:05:19 +0100 (Mon, 17 Nov 2008) | 1 line improve __hash__ docs ........ r67277 | skip.montanaro | 2008-11-19 04:35:41 +0100 (Wed, 19 Nov 2008) | 1 line patch from issue 1108 ........ r67289 | brett.cannon | 2008-11-19 21:29:39 +0100 (Wed, 19 Nov 2008) | 2 lines Ignore .pyc and .pyo files. ........ r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (Thu, 20 Nov 2008) | 1 line move useful sys.settrace information to the function's documentation from the debugger ........ r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (Thu, 20 Nov 2008) | 1 line fix indentation and a sphinx warning ........ r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (Thu, 20 Nov 2008) | 1 line oops! didn't mean to disable that test ........ r67303 | benjamin.peterson | 2008-11-20 23:06:22 +0100 (Thu, 20 Nov 2008) | 1 line backport r67300 ........ r67307 | amaury.forgeotdarc | 2008-11-21 00:34:31 +0100 (Fri, 21 Nov 2008) | 9 lines Fixed issue #4233. Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The FileIO object also got a new readonly attribute closefd. Approved by Barry Backport of r67106 from the py3k branch ........ r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (Sat, 22 Nov 2008) | 2 lines #4364: fix attribute name on ctypes object. ........ r67332 | georg.brandl | 2008-11-22 09:45:33 +0100 (Sat, 22 Nov 2008) | 2 lines Fix typo. ........ r67336 | georg.brandl | 2008-11-22 11:08:50 +0100 (Sat, 22 Nov 2008) | 2 lines Fix error about "-*-" being mandatory in coding cookies. ........ r67355 | georg.brandl | 2008-11-23 20:17:25 +0100 (Sun, 23 Nov 2008) | 2 lines #4392: fix parameter name. ........ r67359 | georg.brandl | 2008-11-23 22:57:30 +0100 (Sun, 23 Nov 2008) | 2 lines #4399: fix typo. ........ r67362 | gregory.p.smith | 2008-11-24 01:41:43 +0100 (Mon, 24 Nov 2008) | 2 lines Document PY_SSIZE_T_CLEAN for PyArg_ParseTuple. ........ r67364 | benjamin.peterson | 2008-11-24 02:16:29 +0100 (Mon, 24 Nov 2008) | 2 lines replace reference to debugger-hooks ........ r67367 | georg.brandl | 2008-11-24 17:16:07 +0100 (Mon, 24 Nov 2008) | 2 lines Fix typo. ........ r67368 | georg.brandl | 2008-11-24 20:56:47 +0100 (Mon, 24 Nov 2008) | 2 lines #4404: make clear what "path" is. ........ r67370 | jeremy.hylton | 2008-11-24 23:00:29 +0100 (Mon, 24 Nov 2008) | 8 lines Add unittests that verify documented behavior of public methods in Transport class. These methods can be overridden. The tests verify that the overridden methods are called, and that changes to the connection have a visible effect on the request. ........
* #2767: don't clear globs in run() call, since they could be needed in tearDown,Georg Brandl2008-05-121-1/+1
| | | | which clears them at the end.
* #2766: remove code without effect.Georg Brandl2008-05-121-2/+0
|
* Doctest results return a named tuple for readabilityRaymond Hettinger2008-01-111-12/+15
|
* Fix issue #1530.Alexandre Vassalotti2007-12-081-3/+6
| | | | Return an error exit status if not all tests passes.
* Replaced import of the 'new' module with 'types' module and added a ↵Christian Heimes2007-11-271-4/+4
| | | | deprecation warning to the 'new' module.
* back in these go - thanks to Titus Brown for the fixSkip Montanaro2007-11-241-0/+13
|
* revert change that breaks test_doctest (which I forgot to run - sorry)Skip Montanaro2007-11-241-11/+0
|
* Make trace and doctest play nice together (issue 1429818). Will backport.Skip Montanaro2007-11-231-0/+11
|
* doctest assumed that a package's __loader__.get_data() method used universalBrett Cannon2007-11-211-1/+4
| | | | | | | newlines; it doesn't. To rectify this the string returned replaces all instances of os.linesep with '\n' to fake universal newline support. Backport candidate.
* Small nit, found by Neal.Georg Brandl2007-03-061-2/+2
|
* Patch #1663234: you can now run doctest on test files and modulesGeorg Brandl2007-03-061-2/+17
| | | | using "python -m doctest [-v] filename ...".
* Fix a couple of typos.Neal Norwitz2006-08-291-2/+2
|
* Bug #1529297: The rewrite of doctest for Python 2.4 unintentionallyTim Peters2006-07-271-0/+5
| | | | | lost that tests are sorted by name before being run. ``DocTestFinder`` has been changed to sort the list of tests it returns.
* Remove unused importNeal Norwitz2006-06-121-1/+1
|
* Remove doctest.testmod's deprecated (in 2.4) `isprivate`Tim Peters2006-06-051-76/+9
| | | | argument. A lot of hair went into supporting that!
* Whitespace normalization.Tim Peters2006-05-301-3/+3
|
* ("Forward-port" of r46506)Armin Rigo2006-05-281-5/+6
| | | | | | | | | | | | | | Remove various dependencies on dictionary order in the standard library tests, and one (clearly an oversight, potentially critical) in the standard library itself - base64.py. Remaining open issues: * test_extcall is an output test, messy to make robust * tarfile.py has a potential bug here, but I'm not familiar enough with this code. Filed in as SF bug #1496501. * urllib2.HTTPPasswordMgr() returns a random result if there is more than one matching root path. I'm asking python-dev for clarification...
* Patch #1080727: add "encoding" parameter to doctest.DocFileSuiteGeorge Yoshida2006-05-281-2/+17
| | | | Contributed by Bjorn Tillenius.
* Patch #721464: pdb.Pdb instances can now be given explicit stdin andGeorg Brandl2006-05-101-1/+1
| | | | | stdout arguments, making it possible to redirect input and output for remote debugging.
* Variant of patch #1478292. doctest.register_optionflag(name)Tim Peters2006-05-101-3/+2
| | | | | shouldn't create a new flag when `name` is already the name of an option flag.
* Patch #1475231: add a new SKIP doctest option, thanks toTim Peters2006-04-251-0/+9
| | | | Edward Loper.
* Updated the warnings, linecache, inspect, traceback, site, and doctest modulesPhillip J. Eby2006-04-111-11/+15
| | | | | to work correctly with modules imported from zipfiles or via other PEP 302 __loader__ objects. Tests and doc updates are included.
* Fix test cases for doctest.Georg Brandl2005-06-261-0/+1
|
* bug [ 1172785 ] doctest.script_from_examples() result sometimes un-exec-ableGeorg Brandl2005-06-261-1/+2
|
* SF patch 1167316: doctest.py fails self-test if run directly.Tim Peters2005-03-281-5/+5
| | | | | | Patch by Ilya Sandler. Bugfix candidate.
* add __file__ to the globals available for tests loaded via DocFileSuite;Fred Drake2004-12-211-0/+4
| | | | | this is useful for locating supporting data files, just as it is in Python modules
* And delete a useless comment.Tim Peters2004-11-081-1/+0
|
* _OutputRedirectingPdb.trace_dispatch(): Return the base class'sTim Peters2004-11-081-4/+5
| | | | trace_dispatch() result in a more obvious, and more robust way.
* test_doctest.py test_pdb_set_trace_nested(): A new test from Jim FultonTim Peters2004-11-081-3/+2
| | | | | | | | | 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.
* Fixed a small bug. doctest didn't handle unicode docstrings containingJim Fulton2004-10-131-1/+3
| | | | non-ascii characters.
* Reverted the addition of a NORMALIZE_NUMBERS option, per Tim Peter'sEdward Loper2004-09-281-79/+1
| | | | | | | | 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.)
* Added a new NORMALIZE_NUMBERS option, which causes number literals inEdward Loper2004-09-281-1/+79
| | | | | the expected output to match corresponding number literals in the actual output if their values are equal (to ten digits of precision).
* - Added a "parser" option to testfile() and DocFileTest().Edward Loper2004-09-271-5/+12
|
* Removed debug_script from the public API: no docs, not public. I'm inTim Peters2004-09-261-1/+0
| | | | | the process of writing docs for the other "missing" debug support functions.
* Add set_unittest_reportflags() to the public API. Docs will followTim Peters2004-09-261-0/+1
| | | | "soon", after I repair the LaTeX I somehow damaged.
* Removed two undocumented unittest support classes, and one undocumentedTim Peters2004-09-261-3/+0
| | | | | unittest support function, from the public interface. If they're not documented, they shouldn't be public.
* Removed most of the module docstring. There's too much to explain now,Tim Peters2004-09-251-124/+2
| | | | and the LaTeX docs are in increasingly good shape.
* - Minor docstring fixes.Edward Loper2004-09-211-15/+9
| | | | - Simplified code to find names for file-based tests.
* Whitespace normalization.Tim Peters2004-09-201-4/+4
|
* - Added "testfile" function, a simple function for running & verifyingEdward Loper2004-09-191-37/+183
| | | | | | | | 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.
* In DocFileTest:Edward Loper2004-09-181-3/+20
| | | | | | | - 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).
* exclude_empty: make the default True for DocTestFinder, and introduce itTim Peters2004-09-131-7/+7
| | | | | | | 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().
* Added new parameter exclude_empty to DocTestFinder.__init__, whichEdward Loper2004-09-131-8/+14
| | | | | controls whether tests are included for objects with empty docstrings. Defaults to True, to match the behavior of Python 2.3.