summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2004-09-011-3/+3
|
* Missed some occurrences of test_mpzAndrew M. Kuchling2004-08-311-3/+0
|
* Remove test output for rotor, xreadlineAndrew M. Kuchling2004-08-312-9/+0
|
* Remove test for mpzAndrew M. Kuchling2004-08-311-89/+0
|
* Remove tests for mpz, rotor, xreadlinesAndrew M. Kuchling2004-08-313-84/+0
|
* Use multi-line importAndrew M. Kuchling2004-08-311-4/+4
|
* SF patch #1007189, multi-line imports, for instance:Anthony Baxter2004-08-314-2/+62
| | | | | "from blah import (foo, bar baz, bongo)"
* Changed Karatsuba cutoff to match current reality.Tim Peters2004-08-301-1/+1
|
* Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists ↵Johannes Gijsbers2004-08-302-0/+12
| | | | in glob.glob.
* Teach the random module about os.urandom().Raymond Hettinger2004-08-301-0/+102
| | | | | * Use it for seeding when it is available. * Provide an alternate generator based on it.
* Whitespace normalization. test_difflib passes again.Tim Peters2004-08-292-70/+70
|
* Reverting whitespace normalization. test_difflib fails with it -- theTim Peters2004-08-291-16/+16
| | | | | test depends on invisible trailing whitespace in .py files. The author will have to repair that.
* Whitespace normalization.Tim Peters2004-08-292-17/+17
|
* Patch #914575: difflib side by side diff support, diff.py s/b/s HTML option.Martin v. Löwis2004-08-292-2/+652
|
* Patch #934711: Expose platform-specific entropy.Martin v. Löwis2004-08-291-0/+11
|
* 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-291-2/+2
|
* Added an __iter__ method for test suites.Jim Fulton2004-08-281-0/+31
|
* 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-281-5/+111
| | | | | - 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.
* - Removed redundant call to expandtabs in DocTestParesr.Edward Loper2004-08-271-51/+114
| | | | | | | | | | | | | | - 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-261-2/+57
| | | | | | | | | 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-261-7/+3
| | | | | | | | 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.
* Whitespace normalization.Tim Peters2004-08-262-6/+5
|
* Remove unnecessary line.Raymond Hettinger2004-08-261-1/+0
|
* Added REPORT_ONLY_FIRST_FAILURE flag, which supresses output after theEdward Loper2004-08-261-0/+81
| | | | first failing example in each test.
* Renamed UNIFIED_DIFF->REPORT_UDIFF; CONTEXT_DIFF->REPORT_CDIFF; andEdward Loper2004-08-261-7/+7
| | | | | | | 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-261-6/+2
|
* - Changed the output of report_start() and report_unexpected_exception()Edward Loper2004-08-261-22/+40
| | | | | | | 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
|
* Added an "exc_msg" attribute to Example (containing the expectedEdward Loper2004-08-261-16/+77
| | | | | | | | | 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-251-3/+13
| | | | | | | | 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.
* PEP 292 classes Template and SafeTemplate are added to the string module.Barry Warsaw2004-08-251-0/+84
| | | | | | | | 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-252-7/+9
| | | | | | | 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.
* 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.
* 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-231-2/+126
|
* Flush bz2 data even if nothing had been written so far. Fixes #1013882.Martin v. Löwis2004-08-221-1/+7
| | | | Will backport to 2.3.
* Fix repr for negative imaginary part. Fixes #1013908.Martin v. Löwis2004-08-221-0/+1
|
* Added NDIFF_DIFF option.Tim Peters2004-08-221-3/+29
|
* Bugs fixed:Jim Fulton2004-08-221-56/+115
| | | | | | | | | | | | | | | - Test filenames sometimes had trailing .pyc or .pyo sufixes (when module __file__ did). - Trailing spaces spaces in expected output were dropped. New default failure format: - Separation of examples from file info makes examples easier to see - More vertical separation, improving readability - Emacs-recognized file info (also closer to Python exception format)
* _ellipsis_match(): Removed special-casing of "...\n". The semanticsTim Peters2004-08-221-28/+5
| | | | | | are non-obvious either way because the newline character "is invisible", but it's still there all the same, and it's easier to explain/predict if that reality is left alone.