summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a small bug. doctest didn't handle unicode docstrings containingJim Fulton2004-10-132-2/+23
| | | | non-ascii characters.
* Don't spend quite as much time looking for leaks on Windows, whereFredrik Lundh2004-10-131-2/+4
| | | | it's rather expensive to create new processes.
* normalize case when comparing directory names (problem reported byFredrik Lundh2004-10-131-1/+2
| | | | "Khalid A. B." on python-dev)
* Add a comment explaining -kb.Martin v. Löwis2004-10-131-0/+1
|
* New helper remove_stderr_debug_decorations(). This test passes in aTim Peters2004-10-131-7/+24
| | | | | debug build on Windows now. More applications of the helper may be needed on non-Windows platforms.
* Kill several problems at once: test_poll() failed sometimes for me.Tim Peters2004-10-132-8/+11
| | | | | | | | | | | Turns out the mysterious "expected output" file contained exactly N dots, because test_poll() has a loop that *usually* went around N times, printing one dot on each loop trip. But there's no guarantee of that, because the exact value of N depended on the vagaries of scheduling time.sleep()s across two different processes. So stopped printing dots, and got rid of the expected output file. Add a loop counter instead, and verify that the loop goes around at least a couple of times. Also cut the minimum time needed for this test from 4 seconds to 1.
* test_stdout_none(): Don't print "banana" to the screen in the middleTim Peters2004-10-131-2/+5
| | | | | of the test. It's testing stdout in a different process, so it has to print something, but I didn't find "banana" to be self-explanatory.
* Windows test_creationflags() test: print msg to stderr informing theTim Peters2004-10-131-1/+2
| | | | | | tester that a DOS box is expected to flash. Slash the sleep from 2 seconds to a quarter second (why would we want to wait 2 seconds just to stare at a DOS box?).
* XXX about extreme expense of test_no_leaking() on Windows. I'm not sureTim Peters2004-10-131-0/+1
| | | | | | what this is trying to do. If it's necessary for it to create > 1000 processes, it should be controlled by a new resource and not run by default on Windows.
* Experience with Zope2's tests showed it's a Bad Idea to make unittestTim Peters2004-10-121-45/+35
| | | | | | display a test's docstring as "the name" of the test. So changed most test docstrings to comments, and removed the clearly useless ones. Now unittest reports the actual names of the test methods.
* Wrap long lines.Tim Peters2004-10-121-43/+67
|
* Whitespace normalization.Tim Peters2004-10-121-17/+16
|
* Added Peter Astrand's subprocess module.Fredrik Lundh2004-10-122-0/+516
|
* Open source files in universal newlines mode.Michael W. Hudson2004-10-111-1/+1
|
* Locale data that contains regex metacharacters are now properly escaped.Brett Cannon2004-10-061-0/+13
| | | | Closes bug #1039270.
* Whitespace normalization.Tim Peters2004-10-031-1/+1
|
* SF bug #997050: Document, test, & check for non-string values in ↵David Goodger2004-10-031-12/+44
| | | | ConfigParser. Moved the new string-only restriction added in rev. 1.65 to the SafeConfigParser class, leaving existing ConfigParser & RawConfigParser behavior alone, and documented the conditions under which non-string values work.
* SF bug #1017864: ConfigParser now correctly handles default keys, processing ↵David Goodger2004-10-031-0/+10
| | | | them with ``ConfigParser.optionxform`` when supplied, consistent with the handling of config file entries and runtime-set options.
* use new readPlist() and writePlist() functionsJust van Rossum2004-10-021-7/+7
|
* Upon insertion, if memory runs out, the deque was left in a corrupted state.Armin Rigo2004-10-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | deque_item(): a performance bug: the linked list of blocks was followed from the left in most cases, because the test (i < (deque->len >> 1)) was after "i %= BLOCKLEN". deque_clear(): replaced a call to deque_len() with deque->len; not sure what this call was here for, nor if all compilers under the sun would inline it. deque_traverse(): I belive that it could be called by the GC when the deque has leftblock==rightblock==NULL, because it is tracked before the first block is allocated (though closely before). Still, a C extension module subclassing deque could provide its own tp_alloc that could trigger a GC collection after the PyObject_GC_Track()... deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of relying on deque.__iter__().next() to succeed exactly len(deque) times -- an assumption which can break if deques are subclassed. Added a test. I wonder if the length should be explicitely bounded to INT_MAX, with OverflowErrors, as in listobject.c. On 64-bit machines, adding more than INT_MAX in the deque will result in trouble. (Note to anyone/me fixing this: carefully check for overflows if len is close to INT_MAX in the following functions: deque_rotate(), deque_item(), deque_ass_item())
* deque_traverse(): If the deque had one block, and its rightindex wasTim Peters2004-10-011-0/+9
| | | | | BLOCKLEN-1, this assert-failed in a debug build, or went wild with a NULL pointer in a release build. Reported on c.l.py by Stefan Behnel.
* Add tests for syntax errors.Raymond Hettinger2004-09-301-0/+13
|
* Expand scope to include general mapping protocol tests.Raymond Hettinger2004-09-301-0/+13
| | | | | | Many of these tests are redundant, but this will ensure that the mapping protocols all stay in sync. Also, added a test for dictionary subclasses.
* Add missing test_dict.py from patch #736962.Walter Dörwald2004-09-301-0/+404
|
* Improve test coverage.Raymond Hettinger2004-09-305-34/+49
|
* Improve test coverage.Raymond Hettinger2004-09-292-0/+45
|
* Improve test coverage.Raymond Hettinger2004-09-292-5/+116
|
* 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.)
* * Increase test coverage.Raymond Hettinger2004-09-281-0/+29
| | | | * Have groupby() be careful about decreffing structure members.
* 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).
* Use Py_CLEAR(). Add unrelated test.Raymond Hettinger2004-09-281-0/+3
|
* Plug a leak and beef-up test coverage.Raymond Hettinger2004-09-281-0/+149
|
* Rename test for comparision errors.Raymond Hettinger2004-09-271-1/+1
|
* Beef-up tests for greater coverage and refcount checking.Raymond Hettinger2004-09-271-1/+59
|
* Patch #1011240: SystemError generated by struct.pack('P', 'foo').Armin Rigo2004-09-271-0/+1
|
* Use floor division operator.Raymond Hettinger2004-09-275-5/+5
|
* Checkin Tim's fix to an error discussed on python-dev.Raymond Hettinger2004-09-261-0/+5
| | | | | | | | | | | | | | | | | Also, add a testcase. Formerly, the list_extend() code used several local variables to remember its state across iterations. Since an iteration could call arbitrary Python code, it was possible for the list state to be changed. The new code uses dynamic structure references instead of C locals. So, they are always up-to-date. After list_resize() is called, its size has been updated but the new cells are filled with NULLs. These needed to be filled before arbitrary iteration code was called; otherwise, that code could attempt to modify a list that was in a semi-invalid state. The solution was to change the ob->size field back to a value reflecting the actual number of valid cells.
* Whitespace normalization.Tim Peters2004-09-241-1/+1
|
* Port test_unpack to doctest (patch #736962).Johannes Gijsbers2004-09-241-144/+131
|
* Add yet more tests for buffer().Neil Schemenauer2004-09-241-0/+11
|
* Add a few more tests for the buffer() object.Neil Schemenauer2004-09-241-0/+8
|
* Whitespace normalization.Tim Peters2004-09-241-1/+1
|
* SF bug #513866: Float/long comparison anomaly.Tim Peters2004-09-231-2/+102
| | | | | | | | | | | | | | | | | | When an integer is compared to a float now, the int isn't coerced to float. This avoids spurious overflow exceptions and insane results. This should compute correct results, without raising spurious exceptions, in all cases now -- although I expect that what happens when an int/long is compared to a NaN is still a platform accident. Note that we had potential problems here even with "short" ints, on boxes where sizeof(long)==8. There's #ifdef'ed code here to handle that, but I can't test it as intended. I tested it by changing the #ifdef to trigger on my 32-bit box instead. I suppose this is a bugfix candidate, but I won't backport it. It's long-winded (for speed) and messy (because the problem is messy). Note that this also depends on a previous 2.4 patch that introduced _Py_SwappedOp[] as an extern.
* Improve three recipes in the itertools docs.Raymond Hettinger2004-09-231-3/+9
|
* Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.Phillip J. Eby2004-09-231-2/+16
|
* SF patch #1031667: Fold tuples of constants into a single constantRaymond Hettinger2004-09-221-3/+13
| | | | | | | | Example: >>> import dis >>> dis.dis(compile('1,2,3', '', 'eval')) 0 0 LOAD_CONST 3 ((1, 2, 3)) 3 RETURN_VALUE
* Bug #1030125: rfc822 __iter__ problemRaymond Hettinger2004-09-221-0/+11
| | | | Add iteration support to the Message class.
* - 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.
* In DocFileTest:Edward Loper2004-09-181-3/+26
| | | | | | | - 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).