summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Patch #934711: Expose platform-specific entropy.Martin v. Löwis2004-08-292-0/+32
|
* SF feature request #992967: array.array objects should support sequences.Raymond Hettinger2004-08-291-3/+35
| | | | Made the constructor accept general iterables.
* Whitespace normalization.Tim Peters2004-08-292-10/+10
|
* Added an __iter__ method for test suites.Jim Fulton2004-08-282-0/+34
|
* setUp and tearDown functions are now passed the test objectJim Fulton2004-08-281-2/+2
|
* - setUp and tearDown functions are now passed the test objectJim Fulton2004-08-282-22/+235
| | | | | - Added a set_unittest_reportflags to set default reporting flags used when running doctests under unittest control.
* Removed old "if 0:" block for leak detection; wouldn't work anymore anyway.Tim Peters2004-08-271-8/+1
|
* Don't really need ellipsis doctests for the syntax errors, becauseTim Peters2004-08-271-12/+12
| | | | | | this module imports itself explicitly from test (so the "file names" current doctest synthesizes for examples don't vary depending on how test_generators is run).
* Removed outdated commentEdward Loper2004-08-271-2/+0
|
* Fixed 6 failures due to doctest changes.Tim Peters2004-08-271-16/+16
|
* test_bug1001011(): Verify thatTim Peters2004-08-271-5/+33
| | | | | | | | | s.join([t]) is t for (s, t) in (str, str), (unicode, unicode), and (str, unicode). For (unicode, str), verify that it's *not* t (the result is promoted to unicode instead). Also verify that when t is a subclass of str or unicode that "the right thing" happens.
* Remove unused method _OutputRedirectingPdb.resumeEdward Loper2004-08-271-3/+0
|
* - Removed redundant call to expandtabs in DocTestParesr.Edward Loper2004-08-272-67/+175
| | | | | | | | | | | | | | - Improvements to interactive debugging support: - Changed the replacement pdb.set_trace to redirect stdout to the real stdout *only* during interactive debugging; stdout from code continues to go to the fake stdout. - When the interactive debugger gets to the end of an example, automatically continue. - Use a replacement linecache.getlines that will return source lines from doctest examples; this makes the source available to the debugger for interactive debugging. - In test_doctest, use a specialized _FakeOutput class instead of a temporary file to fake stdin for the interactive interpreter.
* - Added DocTestParser.parse(), which parses a docstring into ExamplesEdward Loper2004-08-262-145/+137
| | | | | | | | | and intervening text strings. - Removed DocTestParser.get_program(): use script_from_examples() instead. - Fixed bug in DocTestParser._INDENT_RE - Fixed bug in DocTestParser._min_indent - Moved _want_comment() to the utility function section
* Move test_bug1001011() to string_tests.MixinStrUnicodeTest so thatWalter Dörwald2004-08-264-24/+23
| | | | | | it can be used for str and unicode. Drop the test for "".join([s]) is s because this is an implementation detail (and doesn't work for unicode)
* output_difference(): In fancy-diff cases, the way this split expected &Tim Peters2004-08-262-9/+5
| | | | | | | | actual output into lines created spurious empty lines at the ends of each. Those matched, but the fancy diffs had surprising line counts (1 larger than expected), and tests kept having to slam <BLANKLINE> into the expected output to account for this. Using the splitlines() string method with keepends=True instead accomplishes what was intended directly.
* Add missing executable option to DummyCommand.Martin v. Löwis2004-08-261-1/+3
|
* Whitespace normalization.Tim Peters2004-08-262-6/+5
|
* _do_a_fancy_diff(): Pay no attention to the ellipses behind the curtain.Tim Peters2004-08-261-7/+11
| | | | | | | | | While a fancy diff can be confusing in the presence of ellipses, so far I'm finding (2-0-0) that it's much more a major aid in narrowing down the possibilities when an ellipsis-slinging test fails. So we no longer refuse to do a fancy diff just because of ellipses. This isn't ideal; it's just better.
* Remove unnecessary line.Raymond Hettinger2004-08-261-1/+0
|
* Changed OutputChecker.output_difference to expect an Example object,Edward Loper2004-08-261-6/+6
| | | | | | rather than an expected output string. This gives the output_difference method access to more information, such as the indentation of the example, which might be useful.
* Added REPORT_ONLY_FIRST_FAILURE flag, which supresses output after theEdward Loper2004-08-262-10/+103
| | | | first failing example in each test.
* Renamed UNIFIED_DIFF->REPORT_UDIFF; CONTEXT_DIFF->REPORT_CDIFF; andEdward Loper2004-08-262-23/+23
| | | | | | | NDIFF_DIFF->REPORT_NDIFF. This establishes the naming convention that all reporting options should begin with "REPORT_" (since reporting options are a different class from output comparison options; but they are both set in optionflags).
* Shortened diff output for unified & context diffsEdward Loper2004-08-262-12/+8
|
* - Changed the output of report_start() and report_unexpected_exception()Edward Loper2004-08-262-58/+64
| | | | | | | to be more consistent with report_failure() - If `want` or `got` is empty, then print "Expected nothing\n" or "Got nothing\n" rather than "Expected:\n" or "Got:\n" - Got rid of _tag_msg
* Patch #1014930. Expose current parse location to XMLParser.Dave Cole2004-08-261-0/+39
|
* Minor improvements to the template code.Raymond Hettinger2004-08-261-18/+15
| | | | | | | | * Add comment bars segregating this code from the rest. * Improve readability of the re pattern with indentation and comments on the same line. * Replace the groupdict() and get() pair with a direct call to group() which does the same thing.
* Added an "exc_msg" attribute to Example (containing the expectedEdward Loper2004-08-262-59/+139
| | | | | | | | | exception message, or None if no exception is expected); and moved exception parsing from DocTestRunner to DocTestParser. This is architecturally cleaner, since it moves all parsing work to DocTestParser; and it should make it easier for code outside DocTestRunner (notably debugging code) to properly handle expected exceptions.
* Only recognize the expected output as an exception if it *starts* withEdward Loper2004-08-252-15/+21
| | | | | | | | a traceback message. I.e., examples that raise exceptions may no longer generate pre-exception output. This restores the behavior of doctest in python 2.3. The ability to check pre-exception output is being removed because it makes the documentation simpler; and because there are very few use cases for it.
* Patch #970015: Replace - by _ in version and release.Martin v. Löwis2004-08-251-2/+2
|
* Patch #970019: Include version and release in the BuildRoot.Martin v. Löwis2004-08-251-1/+1
|
* Patch #736857, #736859: Add -e option to build_scripts.Martin v. Löwis2004-08-252-2/+10
|
* Patch #1014992: Never return more than a line from readline.Martin v. Löwis2004-08-251-3/+1
| | | | Will backport to 2.3.
* PEP 292 classes Template and SafeTemplate are added to the string module.Barry Warsaw2004-08-255-65/+205
| | | | | | | | This patch includes test cases and documentation updates, as well as NEWS file updates. This patch also updates the sre modules so that they don't import the string module, breaking direct circular imports.
* Stop producing or using OverflowWarning. PEP 237 thought this wouldTim Peters2004-08-253-7/+10
| | | | | | | happen in 2.3, but nobody noticed it still was getting generated (the warning was disabled by default). OverflowWarning and PyExc_OverflowWarning should be removed for 2.5, and left notes all over saying so.
* Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),Mark Hammond2004-08-241-0/+4
| | | | | and a test case. When booting a new thread, use the PyGILState API to manage the GIL.
* Fixed bug in DatagramHandler.send()Vinay Sajip2004-08-241-0/+2
|
* SF Patch #1013667: Cleanup Peepholer OutputRaymond Hettinger2004-08-232-2/+104
| | | | | | | | | * Make a pass to eliminate NOPs. Produce code that is more readable, more compact, and a tiny bit faster. Makes the peepholer more flexible in the scope of allowable transformations. * With Guido's okay, bumped up the magic number so that this patch gets widely exercised before the alpha goes out.
* SF Patch #1007087: Return new string for single subclass joins (Bug #1001011)Raymond Hettinger2004-08-231-0/+23
| | | | | | | (Patch contributed by Nick Coghlan.) Now joining string subtypes will always return a string. Formerly, if there were only one item, it was returned unchanged.
* The attempt to shut up deprecation warnings for doctest's own use ofTim Peters2004-08-231-2/+5
| | | | | is_private in its tests failed if doctest.py was run directly. Now it works.
* test_DocTestFinder(): This test failed when test_doctest was runTim Peters2004-08-231-2/+5
| | | | | directly, due to assuming a filename specific to running tests "the normal way". +ELLIPSIS to the rescue!
* Moved some test cases from doctest to test_doctest.Tim Peters2004-08-232-118/+126
|
* Misc cleanups.Tim Peters2004-08-231-28/+26
|
* debug_script(): I changed this in haste before to take out the use ofTim Peters2004-08-231-15/+22
| | | | | | | NamedTemporaryFile (which can't work for this function's purposes on Windows). Leaving temp files behind wasn't a great idea either, though, so try to clean up. At least the test suite no longer leaves any of these guys behind now.
* Patch #1014237: Consistently return booleans throughout.Martin v. Löwis2004-08-231-10/+10
|
* Flush bz2 data even if nothing had been written so far. Fixes #1013882.Martin v. Löwis2004-08-222-3/+9
| | | | Will backport to 2.3.
* Fix repr for negative imaginary part. Fixes #1013908.Martin v. Löwis2004-08-221-0/+1
|
* Start deferring to the LaTeX docs for details. I'd like to move theTim Peters2004-08-221-29/+3
| | | | | | | | | docstrings toward being a lot shorter, and telling the whole truth in the manual instead. This change is an example: the manual has detailed explanations of the option names now, so it's Bad to repeat them in the docstring (two detailed descriptions are certain to get out of synch). Just listing the names has memory-jogging benefits, though, so that's still helpful in the docstring.
* Added NDIFF_DIFF option.Tim Peters2004-08-222-9/+57
|
* Type in docstring.Tim Peters2004-08-221-1/+1
|