summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* test_main(): Restore the decimal context that was inTim Peters2006-03-311-10/+14
| | | | | | | | effect at the time test_decimal was imported. Else running test_decimal had the bad side effect of permanently changing the decimal context in effect. That caused text_tokenize to fail if it ran after test_decimal.
* Repaired a number of errors in this test:Tim Peters2006-03-311-60/+74
| | | | | | | | | | | | | | | | | | - The doctests in decistmt() weren't run at all when test_tokenize was run via regrtest.py. - Some expected output in decistmt() was Windows-specific (but nobody noticed because the doctests weren't getting run). - test_roundtrip() didn't actually test anything when running the tests with -O. Now it does. - Changed test_roundtrip() to show the name of the input file when it fails. That would have saved a lot of time earlier today. - Added a bunch of comments.
* SF patch #1458476 with modifications based on discussions in python-dev. ThisBarry Warsaw2006-03-301-1/+1
| | | | | | adds the following API calls: PySet_Clear(), _PySet_Next(), and _PySet_Update(). The latter two are considered non-public. Tests and documentation (for the public API) are included.
* Minor bugs in the __index__ code (PEP 357), with tests.Armin Rigo2006-03-301-95/+73
|
* whitespace normalisationAnthony Baxter2006-03-305-22/+21
|
* Checking in the test for PEP 357.Armin Rigo2006-03-301-0/+159
| | | | | | This is from the SF tracker as well; for some reason the content of test_index.py was lost and an empty file was checked in instead.
* Fixed bug #1459029 - unicode reprs were double-escaped.Anthony Baxter2006-03-301-0/+16
|
* SF bug #1460340: random.sample can raise KeyErrorRaymond Hettinger2006-03-291-0/+3
| | | | Fix the hit and miss style of testing for sets and dicts.
* Revert r43399.Georg Brandl2006-03-281-6/+6
|
* Bug #1459963: urllib2 now normalizes HTTP header names correctlyGeorg Brandl2006-03-281-6/+6
| | | | with title().
* Make test_augassign pass with -Qnew and convert to unittest.Georg Brandl2006-03-282-310/+325
|
* Make test_coercion pass with -Qnew. Converted to unittest on the occasion.Georg Brandl2006-03-282-1136/+242
|
* In true regression-test spirit, make sure theThomas Wouters2006-03-281-0/+29
| | | | | | | | itertools.tee->instance->attribute->itertools.tee and itertools.tee->teedataobject->itertools.tee cycles, which can be found now that itertools.tee and its teedataobject participate in GC, remain findable and cleanable. The test won't fail when they aren't, but at least the frequent hunt-refleaks runs would spot the rise in refleaks.
* Add an example of a generator->freevar->cell->generator reference-cycle thatThomas Wouters2006-03-281-0/+11
| | | | doesn't get cleaned up and thus leaks.
* Make test_decimal work with -Qnew.Georg Brandl2006-03-281-10/+16
|
* Part of bug 1459808: fiddle test_input_and_raw_input()Tim Peters2006-03-281-2/+10
| | | | so it passes w/ -Qnew.
* Part of bug 1459808: fiddle so that this passesTim Peters2006-03-281-12/+12
| | | | with or without -Qnew.
* Fix contextlib not copying function attributesPhillip J. Eby2006-03-281-0/+15
|
* Fix SF bug #1458903 with AST compiler.Neal Norwitz2006-03-272-2/+8
| | | | | | | | | | | | def foo((x)): was getting recognized as requiring tuple unpacking which is not correct. Add tests for this case and the proper way to unpack a tuple of one: def foo((x,)): test_inpsect was incorrect before. I'm not sure why it was passing, but that has been corrected with a test for both functions above. This means the test (and therefore inspect.getargspec()) are broken in 2.4.
* Fix typo.Martin v. Löwis2006-03-261-1/+1
|
* Patch from Aldo Cortesi: expected skips for OpenBSD.Martin v. Löwis2006-03-261-0/+30
|
* Provide more debug output, to diagnose OpenBSD test failures.Martin v. Löwis2006-03-261-1/+1
|
* Allow long objects as a position value of error callbacks returned.Hye-Shik Chang2006-03-262-2/+21
|
* regsub is gone, nothing to ignoreNeal Norwitz2006-03-261-2/+0
|
* Try to handle sys.getfilesystemencoding() returning None.Neal Norwitz2006-03-261-1/+4
| | | | | ascii seems like the safest bet that it will exist. I wonder if utf-8 would be a better choice? This should get test_fileinput passing on OpenBSD.
* Patch #1443155: Add the incremental codecs support for CJK codecs.Hye-Shik Chang2006-03-262-74/+250
| | | | (reviewed by Walter Dörwald)
* fix typoGeorg Brandl2006-03-251-1/+1
|
* Don't decrement below zero. And add more tests.Raymond Hettinger2006-03-251-3/+17
|
* Whitespace normalization.Tim Peters2006-03-251-1/+1
|
* Fix a problem with @contextmanager not detecting a broken generatorPhillip J. Eby2006-03-251-0/+22
| | | | | | that yields after a throw(). Make @contextmanager not reraise exceptions, but return a false value in that case instead. Add test cases for both behaviors.
* Support throw() of string exceptions.Phillip J. Eby2006-03-251-2/+4
|
* Revert previous change. Wasn't ready yet.Raymond Hettinger2006-03-241-12/+1
|
* Add more testsRaymond Hettinger2006-03-241-1/+12
|
* SF Patch #1455676: Simplify using Queues with daemon consumer threadsRaymond Hettinger2006-03-241-0/+30
| | | | | Adds join() and task_done() methods to track when all enqueued tasks have been gotten and fully processed by daemon consumer threads.
* Use absolute import.Neal Norwitz2006-03-241-1/+1
|
* Bug #1183780: Add Popen objects to _active only in __del__.Martin v. Löwis2006-03-241-0/+4
| | | | | Cleanup terminated processes as well. Add cmd attribute to Popen4.
* Exceptions should inherit from Exception now.Neal Norwitz2006-03-241-1/+1
|
* Hmmm, I don't think we wanted to test // twice and / not at all (in this ↵Neal Norwitz2006-03-241-3/+3
| | | | section).
* Exceptions should inherit from Exception now.Neal Norwitz2006-03-241-2/+2
|
* Relax result test for program mode of quopri.Martin v. Löwis2006-03-231-2/+5
|
* Rewrite pipe code using subprocess, to make sure theMartin v. Löwis2006-03-231-9/+9
| | | | child process is closed when the test completes.
* Forward port MvL's fix in 43227:Neal Norwitz2006-03-231-0/+4
| | | | | Fix crash when a Unicode string containing an encoding declaration is compile()d. Fixes #1115379.
* Record that test_wait[34] get skipped on native Windows.Tim Peters2006-03-221-0/+2
|
* Correct API design mistake from rev. 43126: make socket attributes readonly ↵Georg Brandl2006-03-211-5/+5
| | | | properties.
* Try to repair at least one segfault on the Mac buildbot,Tim Peters2006-03-211-40/+47
| | | | | | | | | | | | | | | | | | | | | | as diagnosed by Nick Coghlan. test_capi.py: A test module should never spawn a thread as a side effect of being imported. Because this one did, the segfault one of its thread tests caused didn't occur until a few tests after test_regrtest.py thought test_capi was finished. Repair that. Also join() the thread spawned at the end, so that test_capi is truly finished when regrtest reports that it's done. _testcapimodule.c test_thread_state(): this spawns a couple of non-threading.py threads, passing them a PyObject* argument, but did nothing to ensure that those threads finished before returning. As a result, the PyObject* _could_ (although this was unlikely) get decref'ed out of existence before the threads got around to using it. Added explicit synchronization (via a Python mutex) so that test_thread_state can reliably wait for its spawned threads to finish.
* whitespace n11nAnthony Baxter2006-03-201-3/+3
|
* Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. ↵Neal Norwitz2006-03-204-64/+144
| | | | | | | | Schroeder. This was a fair amount of rework of the patch. Refactored test_fork1 so it could be reused by the new tests for wait3/4. Also made them into new style unittests (derive from unittest.TestCase).
* SF [ 1231053 ] audioop - alaw encoding/decoding added, code updatedAnthony Baxter2006-03-201-3/+21
| | | | | | | | | This patch adds a-LAW encoding to audioop and replaces the old u-LAW encoding/decoding code with the current code from sox. Possible issues: the code from sox uses int16_t. Code by Lars Immisch
* Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()Neal Norwitz2006-03-201-0/+11
| | | | | | returns a non-string when converting %Z. Will backport.
* Shim for test_email_renamed.py tests.Barry Warsaw2006-03-181-0/+13
|