summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Back out multifile.py 1.19 and 1.20. Fixes #514676.Martin v. Löwis2002-09-221-0/+66
|
* Suppress hex/oct constant warnings in <string> on 64-bit platforms,Guido van Rossum2002-09-191-0/+5
| | | | because there test_grammar.py pulls them out of strings there.
* Since it tests both ntohl and ntohs, the test should not be calledGuido van Rossum2002-09-161-1/+1
| | | | testNtoHL but testNtoH.
* Don't test whether surrogate sequences round-trip in UTF-8. 2.2.2 candidate.Martin v. Löwis2002-09-141-1/+4
|
* Use integer above sys.maxunicode for range test. Fixes #608884.Martin v. Löwis2002-09-141-2/+2
| | | | 2.2.2 candidate.
* Maybe this fixes test_socket on 64-bit Linux.Guido van Rossum2002-09-141-9/+13
|
* Add a bunch of sys.stdout.flush() calls that will hopefully improveGuido van Rossum2002-09-131-0/+7
| | | | the usability of the output of the Xenofarm builds.
* If PyXML is installed, there is no Node.allnodes, so that portion ofFred Drake2002-09-121-11/+22
| | | | the test should be skipped if that's the case.
* Relax a test so it passes either with the standard library or PyXML.Fred Drake2002-09-121-1/+1
| | | | | | The original expected value is actually wrong, but we'll pick up the real fix and test when we refresh the xml package from PyXML before 2.3a1.
* The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms.Guido van Rossum2002-09-111-15/+21
| | | | | | | | Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a 64-bit value, there's no way to make this test succeed on a 64-bit platform. So just skip it when sys.maxint isn't 0x7fffffff. Backport candidate.
* A slight change to SET_LINENO-less tracing.Michael W. Hudson2002-09-111-1/+1
| | | | | This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.
* Bunch more tests.Michael W. Hudson2002-09-111-9/+83
|
* test_both(): I believe this was a typo: m is only defined if noBarry Warsaw2002-09-111-1/+1
| | | | | | | | | | | | exception occurred so it should only be closed in the else clause. Without this change we can an UnboundLocalError on Linux: Traceback (most recent call last): File "Lib/test/test_mmap.py", line 304, in ? test_both() File "Lib/test/test_mmap.py", line 208, in test_both m.close() UnboundLocalError: local variable 'm' referenced before assignment
* test_quote_unquote(): Added a test for the rfc822.unquote() patchBarry Warsaw2002-09-111-0/+6
| | | | (adapted from Quinn Dunkan's mimelib SF patch #573204).
* I left some debugging junk in here; removed it. Also replaced a fewTim Peters2002-09-101-2/+3
| | | | | more instances of the bizarre "del f; del m" ways to spell .close() (del won't do any good here under Jython, etc).
* A few days ago a test was added here to ensure that creating an mmapTim Peters2002-09-101-4/+15
| | | | | | | | | | with a size larger than the underlying file worked on Windows. It does <wink>. However, merely creating an mmap that way has the side effect of growing the file on disk to match the specified size. A *later* test assumed that the file on disk was still exactly as it was before the new "size too big" test was added, but that's no longer true. So added a hack at the end of the "size too big" test to truncate the disk file back to its original size on Windows.
* Fix escaping of non-ASCII characters.Martin v. Löwis2002-09-091-0/+1
|
* Try to get test to pass on WindowsNeal Norwitz2002-09-071-1/+2
|
* Skip UDP testing for MacPython (for now), it hangs. This may be due toJack Jansen2002-09-061-1/+3
| | | | GUSI/Threading interaction, I'm not sure, but I don't have the time to fix this right now.
* Add a test case that checks that the proper exception is raisesWalter Dörwald2002-09-061-0/+15
| | | | | when the replacement from an encoding error callback is itself unencodable.
* SF bug # 585792, Invalid mmap crashes Python interpreterNeal Norwitz2002-09-052-0/+16
| | | | | Raise ValueError if user passes a size to mmap which is larger than the file.
* Change the unicode.translate docstring to document thatWalter Dörwald2002-09-041-0/+2
| | | | | | | | | | Unicode strings (with arbitrary length) are allowed as entries in the unicode.translate mapping. Add a test case for multicharacter replacements. (Multicharacter replacements were enabled by the PEP 293 patch)
* Delete the %c test from test_date_time() untill Brett Cannon has timeGuido van Rossum2002-09-031-2/+2
| | | | | | to fix it. (It fails when the day of the month is a 1-digit number, because %c produces space+digit there, while strptime seems to expect zero+digit somehow.)
* Add a custom __str__ method to KeyError that applies repr() to theGuido van Rossum2002-09-031-1/+1
| | | | | missing key. (Also added a guard to SyntaxError__str__ to prevent calling PyString_Check(NULL).)
* testConnectTimeout(): set the timeout to a smaller value; 0.02Guido van Rossum2002-09-031-1/+1
| | | | sometimes wasn't short enough.
* Check whether a string resize is necessary at the endWalter Dörwald2002-09-031-1/+8
| | | | | | | | | of PyString_DecodeEscape(). This prevents a call to _PyString_Resize() for the empty string, which would result in a PyErr_BadInternalCall(), because the empty string has more than one reference. This closes SF bug http://www.python.org/sf/603937
* PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald2002-09-021-0/+483
|
* Further SET_LINENO reomval fixes. See comments in patch #587933.Michael W. Hudson2002-08-301-0/+110
| | | | | | | | | | Use a slightly different strategy to determine when not to call the line trace function. This removes the need for the RETURN_NONE opcode, so that's gone again. Update docs and comments to match. Thanks to Neal and Armin! Also add a test suite. This should have come with the original patch...
* The test I saw failing this morning just happened to be run at 8amBarry Warsaw2002-08-291-0/+12
| | | | | | | | localtime, which in -0400 is 12 noon GMT. The bug boiled down to broken conversion of 12 PM to hour 12 for the '%I %p' format string. Added a test for this specific condition: Strptime12AMPMTests. Fix to _strptime.py coming momentarily.
* Undo Barry's change. This file is not imported, it's fed as input toGuido van Rossum2002-08-292-15/+15
| | | | | | the tokenize module by test_tokenize.py. The FutureWarnings only appeared during installation, and I've figured out a way to suppress those in a different way.
* Restore the hex/oct constant tests that Barry commented out for fearGuido van Rossum2002-08-291-2/+9
| | | | of FutureWarnings. Added a comment explaining the situation.
* complex() was the only numeric constructor that created a new instanceRaymond Hettinger2002-08-291-0/+4
| | | | when given its own type as an argument.
* Fixed three exceptions in the Plain integers test, although I'm notBarry Warsaw2002-08-291-3/+3
| | | | | | | | | | | sure these are the best fixes. - Test maxint-1 against the negative octal constant -020000000000 - Comment out the tests for oct -1 and hex -1, since 037777777777 and 0xffffffff raise FutureWarnings now and in Python 2.4 those constants will produce positive values, not negative values. So the existing test seems to test something that won't be true in 2.4.
* The test_tokenize output has changed slightly, by the addition of someBarry Warsaw2002-08-291-12/+12
| | | | trailing `L's.
* Quite down some FutureWarnings.Barry Warsaw2002-08-282-6/+6
|
* Implemented <, <=, >, >= for sets, giving subset and proper-subsetTim Peters2002-08-251-7/+21
| | | | | | meanings. I did not add new, e.g., ispropersubset() methods; we're going nuts on those, and, e.g., there was no "friendly name" for == either.
* TestSubset(): Generalized the framework to support testing upcomingTim Peters2002-08-251-10/+23
| | | | <, <=, etc methods too.
* Rewrote all remaining assert stmts.Tim Peters2002-08-251-30/+30
|
* Simplified construction of the test suite.Tim Peters2002-08-251-21/+23
|
* Simplified code building sets of characters.Tim Peters2002-08-251-5/+5
|
* Ack! Virtually every test here relied on an assert stmt. assert stmtsTim Peters2002-08-251-60/+60
| | | | should never be used in tests. Repaired dozens, but more is needed.
* Simplified the setup for is-subset testing.Tim Peters2002-08-251-25/+20
|
* Removed < <= > >= from the API. Implemented as comparisons of theRaymond Hettinger2002-08-241-2/+2
| | | | | | | | underlying dictionaries, there were no reasonable use cases (lexicographic sorting of a list of sets is somewhat esoteric). Frees the operators for other uses (such as strict subset and superset comparisons). Updated documentation and test suite accordingly.
* At Tim Peter's suggestion, propagated GvR's binary operator changes toRaymond Hettinger2002-08-241-0/+32
| | | | | | | | | | | | the inplace operators. The strategy is to have the operator overloading code do the work and then to define equivalent method calls which rely on the operators. The changes facilitate proper application of TypeError and NonImplementedErrors. Added corresponding tests to the test suite to make sure both the operator and method call versions get exercised. Add missing tests for difference_update().
* Expanded tests for sets of sets.Raymond Hettinger2002-08-241-0/+4
|
* Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do theGuido van Rossum2002-08-231-0/+2
| | | | | | | | | | | | | wrong thing for a unicode subclass when there were zero string replacements. The example given in the SF bug report was only one way to trigger this; replacing a string of length >= 2 that's not found is another. The code would actually write outside allocated memory if replacement string was longer than the search string. (I wonder how many more of these are lurking? The unicode code base is full of wonders.) Bugfix candidate; this same bug is present in 2.2.1.
* Code by Inyeol Lee, submitted to SF bug 595350, to implementGuido van Rossum2002-08-233-10/+8
| | | | | the string/unicode method .replace() with a zero-lengt first argument. Inyeol contributed tests for this too.
* Got rid of the toy _Set class, in favor of sets.Set.Tim Peters2002-08-231-33/+6
|
* Test an em-dash with adjacent punctuation.Greg Ward2002-08-221-0/+6
|
* Factored out BaseTestCase.check_split() method -- use it whereverGreg Ward2002-08-221-8/+8
| | | | we need to test TextWrapper._split().