summaryrefslogtreecommitdiff
path: root/Lib/test/test_doctest.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-24746: Fix doctest failures when running the testsuite with -R (#11501) ↵Senthil Kumaran2019-01-101-2/+1
| | | | (#11512)
* [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff ↵Sanyam Khurana2019-01-091-2/+48
| | | | | | | | | | | (#11482) * bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff * [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639). (cherry picked from commit cbb16459934eaf29c7c7d362939cd05550b2f21f) Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
* Issue #23943: Fix typos. Patch by Piotr Kasprzyk.Martin Panter2016-07-281-2/+2
|
* Issue #27076: Doc, comment and test function name spelling fixesMartin Panter2016-05-261-1/+1
| | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|
* Fix test_doctest in verbose modeVictor Stinner2015-12-021-2/+2
|
* Open files in binary mode to avoid newlines transformation.Serhiy Storchaka2015-04-041-2/+2
|
* explicitly close files (closes #23090)Benjamin Peterson2014-12-201-2/+4
| | | | Patch by Brian Kearns.
* #8473: make doctest.testfile use universal newline mode.R David Murray2014-10-021-0/+26
|
* Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead.Tim Peters2013-12-031-6/+6
|
* Issue #19138: doctest's IGNORE_EXCEPTION_DETAIL now allows no detail at all.Tim Peters2013-12-031-0/+27
| | | | Grafted from c80083ad142d.
* don't expect warnings from doctests if they can't runBenjamin Peterson2012-10-151-1/+3
|
* #14649: clarify DocTestSuite error when there are no docstrings.R David Murray2012-09-101-0/+25
| | | | | | | Also adds tests to verify the documented behavior (which is probably a bug, as indicated in the added comments). Patch by Chris Jerdonek.
* Followup to #7502: add __hash__ method and tests.Antoine Pitrou2011-12-181-0/+19
|
* Issue #7502: Fix equality comparison for DocTestCase instances.Antoine Pitrou2011-12-181-0/+40
| | | | Patch by Cédric Krier.
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-4/+4
|
* Fix the issue with non-ascii char in doctest. Issue #9409Florent Xicluna2010-10-141-2/+5
| | | | | | | | | | | | | | | Recorded merge of revisions 85495,85500 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85495 | florent.xicluna | 2010-10-14 22:56:20 +0200 (jeu., 14 oct. 2010) | 3 lines Fix the regex to match all kind of filenames, for interactive debugging in doctests. (issue #9409) ........ r85500 | florent.xicluna | 2010-10-14 23:35:58 +0200 (jeu., 14 oct. 2010) | 2 lines Add test case for issue #9409, non-ascii char in doctest. It passes in 3.2 but needs fixing in 2.7. ........
* Merged revisions 85495 via svnmerge fromFlorent Xicluna2010-10-141-11/+11
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85495 | florent.xicluna | 2010-10-14 22:56:20 +0200 (jeu., 14 oct. 2010) | 3 lines Fix the regex to match all kind of filenames, for interactive debugging in doctests. (issue #9409) ........
* Merged revisions 83259,83261,83264-83265,83268-83269,83271-83272,83281 via ↵Georg Brandl2010-08-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* #8471: reset _SpoofOut.buf to an empty string when truncating; if Unicode ↵Georg Brandl2010-08-011-1/+27
| | | | had been output previously, it had been coerced to a Unicode string, potentially making subsequent prints behave differently or raise UnicodeErrors.
* Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module ↵Nick Coghlan2010-04-281-0/+71
| | | | containing the exception under test (original patch by Lennart Regebro)
* Issue #7449 part 3, test_doctest: import trace module in test_coverage()Victor Stinner2010-04-271-1/+2
| | | | | | | | | Import trace module fail if the threading module is missing. test_coverage() is only used if test_doctest.py is used with the -c option. This commit allows to execute the test suite without thread support. Move "import trace" in test_coverage() and use test_support.import_module('trace').
* Replace catch_warnings with check_warnings when it makes sense. Use ↵Florent Xicluna2010-03-311-7/+8
| | | | assertRaises context manager to simplify some tests.
* #7092 - Silence more py3k deprecation warnings, using ↵Florent Xicluna2010-03-211-9/+10
| | | | test_support.check_py3k_warnings() helper.
* Issue #1729305: Fix doctest to handle encode error with "backslashreplace". ↵Florent Xicluna2010-02-271-1/+44
| | | | It fixes #7667 too.
* split unittest.py into a packageBenjamin Peterson2009-07-191-19/+19
|
* #6227: Because of a wrong indentation, the test was not testing what it should.Amaury Forgeot d'Arc2009-06-141-0/+2
| | | | Ensure that the snippet in doctest_aliases actually contains aliases.
* Fix several issues relating to access to source code inside zipfiles. ↵Nick Coghlan2008-12-141-1/+4
| | | | Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+1
|
* Doctest results return a named tuple for readabilityRaymond Hettinger2008-01-111-58/+58
|
* Doc patch #1730 from Robin Stocker; minor corrections mostly to os.rst.Georg Brandl2008-01-051-1/+1
|
* Replaced import of the 'new' module with 'types' module and added a ↵Christian Heimes2007-11-271-7/+7
| | | | deprecation warning to the 'new' module.
* Fix a bug in the test for using __loader__.get_data().Brett Cannon2007-11-231-0/+1
|
* Add a missing check before deleting a package's __loader__.Brett Cannon2007-11-211-1/+2
|
* doctest assumed that a package's __loader__.get_data() method used universalBrett Cannon2007-11-211-0/+17
| | | | | | | 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.
* Remove a unneeded line that had typos.Brett Cannon2007-11-211-2/+0
|
* Bug #1529297: The rewrite of doctest for Python 2.4 unintentionallyTim Peters2006-07-271-7/+0
| | | | | lost that tests are sorted by name before being run. ``DocTestFinder`` has been changed to sort the list of tests it returns.
* Remove doctest.testmod's deprecated (in 2.4) `isprivate`Tim Peters2006-06-051-48/+9
| | | | argument. A lot of hair went into supporting that!
* Patch #1080727: add "encoding" parameter to doctest.DocFileSuiteGeorge Yoshida2006-05-281-6/+48
| | | | Contributed by Bjorn Tillenius.
* Variant of patch #1478292. doctest.register_optionflag(name)Tim Peters2006-05-101-0/+20
| | | | | 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/+19
| | | | Edward Loper.
* Part of bug 1459808: fiddle so that this passesTim Peters2006-03-281-12/+12
| | | | with or without -Qnew.
* Merge ast-branch to headJeremy Hylton2005-10-201-6/+6
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* Fix test cases for doctest.Georg Brandl2005-06-261-0/+3
|
* add __file__ to the globals available for tests loaded via DocFileSuite;Fred Drake2004-12-211-0/+8
| | | | | this is useful for locating supporting data files, just as it is in Python modules
* test_doctest.py test_pdb_set_trace_nested(): A new test from Jim FultonTim Peters2004-11-081-3/+90
| | | | | | | | | 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.
* Reverted the addition of a NORMALIZE_NUMBERS option, per Tim Peter'sEdward Loper2004-09-281-101/+0
| | | | | | | | 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-0/+101
| | | | | the expected output to match corresponding number literals in the actual output if their values are equal (to ten digits of precision).
* - Changed SampleClass docstrings to test docstring parsing a littleEdward Loper2004-09-211-7/+18
| | | | more thouroughly.
* - Added "testfile" function, a simple function for running & verifyingEdward Loper2004-09-191-3/+132
| | | | | | | | 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.