summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Add set.isdisjoint()Raymond Hettinger2007-11-081-2/+47
|
* Optimize dict.fromkeys() with dict inputs. Useful for resetting bag/muliset ↵Raymond Hettinger2007-11-071-0/+4
| | | | counts for example.
* Fix marshal's incorrect handling of subclasses of builtin types (backport ↵Raymond Hettinger2007-11-071-0/+11
| | | | candidate).
* Fixes Issue 1385: The hmac module now computes the correct hmac when usingGregory P. Smith2007-11-061-5/+159
| | | | hashes with a block size other than 64 bytes (such as sha384 and sha512).
* Add a missing quotation mark.Brett Cannon2007-11-031-1/+1
|
* Fix for bug 1705170 - contextmanager swallowing StopIteration (2.5 backport ↵Nick Coghlan2007-11-021-0/+17
| | | | candidate)
* Removed non ASCII text from test as requested by Guido. Sorry :/Christian Heimes2007-11-011-20/+2
|
* Backport of import tests for bug http://bugs.python.org/issue1293 and bug ↵Christian Heimes2007-11-011-2/+43
| | | | http://bugs.python.org/issue1342
* Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)Hye-Shik Chang2007-10-283-2/+3
|
* Shorter name for namedtuple()Raymond Hettinger2007-10-231-17/+17
|
* Add phuang patch from Issue 708374 which adds offset parameter to mmap module.Travis E. Oliphant2007-10-231-0/+44
|
* Remove duplicate crasher.Georg Brandl2007-10-211-8/+0
|
* Add a crasher for the long-standing issue with closing a fileArmin Rigo2007-10-211-0/+14
| | | | while another thread uses it.
* The constructor from tuple was way too permissive: it allowed badFacundo Batista2007-10-191-0/+27
| | | | | | | | coefficient numbers, floats in the sign, and other details that generated directly the wrong number in the best case, or triggered misfunctionality in the alorithms. Test cases added for these issues. Thanks Mark Dickinson.
* Issue #1580738. When HTTPConnection reads the whole stream with read(),Facundo Batista2007-10-181-2/+13
| | | | | | | it closes itself. When the stream is read in several calls to read(n), it should behave in the same way if HTTPConnection knows where the end of the stream is (through self.length). Added a test case for this behaviour.
* Fix the overflow checking of list_repeat.Armin Rigo2007-10-171-0/+9
| | | | | | Introduce overflow checking into list_inplace_repeat. Backport candidate, possibly.
* More docs, error messages, and testsRaymond Hettinger2007-10-161-6/+11
|
* test_bigbits was not testing what it seemed to.Armin Rigo2007-10-151-4/+8
|
* Let the O/S supply a port if none of the default ports can be used.Neal Norwitz2007-10-141-4/+12
| | | | | | | | | This should make the tests more robust at the expense of allowing tests to be sloppier by not requiring them to cleanup after themselves. (It will legitamitely help when running two test suites simultaneously or if another process is already using one of the predefined ports.) Also simplifies (slightLy) the exception handling elsewhere.
* Fix test of count.__repr__() to ignore the 'L' if the count is a longRaymond Hettinger2007-10-121-1/+4
|
* Accept Jim Jewett's api suggestion to use None instead of -1 to indicate ↵Raymond Hettinger2007-10-101-1/+18
| | | | unbounded deques.
* Eliminate camelcase function nameRaymond Hettinger2007-10-081-12/+14
|
* Add comments to NamedTuple code.Raymond Hettinger2007-10-081-0/+5
| | | | | Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases). Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
* Ensure that this test will pass even if another test left an unwritable TESTFN.Neal Norwitz2007-10-061-5/+4
| | | | Also use the safe unlink in test_support instead of rolling our own here.
* Use the host the author likely meant in the first place. pop.gmail.com isGregory P. Smith2007-10-061-4/+1
| | | | reliable. gmail.org is someones personal domain.
* Add __asdict__() to NamedTuple and refine the docs.Raymond Hettinger2007-10-052-26/+66
| | | | | | Add maxlen support to deque() and fixup docs. Partially fix __reduce__(). The None as a third arg was no longer supported. Still needs work on __reduce__() to handle recursive inputs.
* itertools.count() no longer limited to sys.maxint.Raymond Hettinger2007-10-041-1/+6
|
* Made the various is_* operations return booleans. This was discussedFacundo Batista2007-10-022-13/+2145
| | | | | | | | | | | with Cawlishaw by mail, and he basically confirmed that to these is_* operations, there's no need to return Decimal(0) and Decimal(1) if the language supports the False and True booleans. Also added a few tests for the these functions in extra.decTest, since they are mostly untested (apart from the doctests). Thanks Mark Dickinson
* Patch # 188 by Philip Jenvey.Guido van Rossum2007-09-221-0/+7
| | | | | Make tell() mark CRLF as a newline. With unit test.
* Issue #1772851. Optimization of __hash__ to behave better for big bigFacundo Batista2007-09-191-0/+32
| | | | numbers.
* Fix obvious typo in threaded test.Thomas Wouters2007-09-191-1/+1
|
* Issue #1772851. Alters long.__hash__ from being *almost* completelyFacundo Batista2007-09-191-0/+11
| | | | | | | predictable to being completely predictable. The value of hash(n) is unchanged for any n that's small enough to be representable as an int, and also unchanged for the vast majority of long integers n of reasonable size.
* Handle corner cased on 0-tuples and 1-tuples. Add verbose option so people ↵Raymond Hettinger2007-09-181-0/+6
| | | | can see how it works.
* The methods always return Decimal classes, even if they'reFacundo Batista2007-09-171-0/+15
| | | | | executed through a subclass (thanks Mark Dickinson). Added a bit of testing for this.
* Sync-up named tuples with the latest version of the ASPN recipe.Raymond Hettinger2007-09-171-0/+7
| | | | | | | Allows optional commas in the field-name spec (help when named tuples are used in conjuction with sql queries). Adds the __fields__ attribute for introspection and to support conversion to dictionary form. Adds a __replace__() method similar to str.replace() but using a named field as a target. Clean-up spelling and presentation in doc-strings.
* use binary mode when reading files for testAsyncore to make Windows happyBill Janssen2007-09-161-1/+1
|
* Add support for asyncore server-side SSL support. This requiresBill Janssen2007-09-162-105/+271
| | | | | | | | | | | | | | | adding the 'makefile' method to ssl.SSLSocket, and importing the requisite fakefile class from socket.py, and making the appropriate changes to it to make it use the SSL connection. Added sample HTTPS server to test_ssl.py, and test that uses it. Change SSL tests to use https://svn.python.org/, instead of www.sf.net and pop.gmail.com. Added utility function to ssl module, get_server_certificate, to wrap up the several things to be done to pull a certificate from a remote server.
* Merged the decimal-branch (revisions 54886 to 58140). Decimal is nowFacundo Batista2007-09-13148-2335/+57695
| | | | | | | fully updated to the latests Decimal Specification (v1.66) and the latests test cases (v2.56). Thanks to Mark Dickinson for all his help during this process.
* Bug #1153: repr.repr() now doesn't require set and dictionary itemsGeorg Brandl2007-09-121-0/+10
| | | | to be orderable to properly represent them.
* root certificate for https://svn.python.org/, used in test_sslBill Janssen2007-09-121-0/+26
|
* Generators had their throw() method allowing string exceptions. That's aBrett Cannon2007-09-111-1/+1
| | | | | | | no-no. Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string exception is passed in.
* Always use the -E flag when spawning subprocesses in test_cmd_line (Issue 1056)Nick Coghlan2007-09-111-5/+2
|
* Make sure test_ssl doesn't reference the ssl module in aBill Janssen2007-09-111-1/+4
| | | | context where it can't be imported.
* A better way of finding an open port to test with.Bill Janssen2007-09-101-3/+26
|
* Patch # 1026 by Benjamin Aranguren (with Alex Martelli):Guido van Rossum2007-09-102-0/+219
| | | | | | | | Backport abc.py and isinstance/issubclass overloading to 2.6. I had to backport test_typechecks.py myself, and make one small change to abc.py to avoid duplicate work when x.__class__ and type(x) are the same.
* Patch # 1140 (my code, approved by Effbot).Guido van Rossum2007-09-101-0/+25
| | | | | | | | | Make sure the type of the return value of re.sub(x, y, z) is the type of y+x (i.e. unicode if either is unicode, str if they are both str) even if there are no substitutions or if x==z (which triggered various special cases in join_list()). Could be backported to 2.5; no need to port to 3.0.
* More work on SSL support.Bill Janssen2007-09-106-215/+620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing.
* Fix a possible segfault from recursing too deep to get the repr of a list.Brett Cannon2007-09-101-0/+5
| | | | Closes issue #1096.
* tr a-z A-Z does not work on Solaris (would requireMartin v. Löwis2007-09-101-3/+6
| | | | /usr/xpg4/bin/tr); make the character ranges explicit.
* Change socket.error to inherit from IOError rather than being a standGregory P. Smith2007-09-091-9/+7
| | | | | | | | | | | | | | | | | | | | | | alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here: http://mail.python.org/pipermail/python-dev/2007-July/073749.html I chose IOError rather than EnvironmentError as the base class since socket objects are often used as transparent duck typed file objects in code already prepared to deal with IOError exceptions. also a minor fix: urllib2 - fix a couple places where IOError was raised rather than URLError. for better or worse, URLError already inherits from IOError so this won't break any existing code. test_urllib2net - replace bad ftp urls.