Tim Peters
4182cfd7db
test_devnull(): Use assertEqual() instead of an assert stmt.
2004-06-08 20:34:34 +00:00
Brett Cannon
6ccc9a99df
Removed test_sitepackages test. Skip discovered that it only passed if Python
...
had already been installed previously.
2004-06-08 18:25:48 +00:00
Martin v. Löwis
bdec50f027
Feature request #935915 : Add os.path.devnull.
2004-06-08 08:29:33 +00:00
Tim Peters
604c013ef2
SF 952807: Unpickling pickled instances of subclasses of datetime.date,
...
datetime.datetime and datetime.time could yield insane objects. Thanks
to Jiwon Seo for the fix.
Bugfix candidate. I'll backport it to 2.3.
2004-06-07 23:04:33 +00:00
Neal Norwitz
c28e7ad3d0
Try to improve test coverage for utime()
2004-06-06 20:27:05 +00:00
Neal Norwitz
7b0a5057af
Look for the multibyte codec map files in the parent directory too
...
This is similar to test_normalization, so that many source trees
can reference the same test file(s).
2004-06-06 20:09:49 +00:00
Skip Montanaro
0179a18034
add -L flag to cause leaks(1) command to run just before exit
2004-06-06 15:53:18 +00:00
Neil Schemenauer
6412b121f6
Remove a number of tests that differ only in input data size. It seems
...
no bug motivated their inclusion and the chance of them triggering a
problem seems unlikely. Refactor to reduce code duplication. Rename
'hamlet_scene' to 'HAMLET_SCENE'. Test is much faster now. Closes #960995 .
2004-06-05 19:34:28 +00:00
Neil Schemenauer
94afd3e7ae
Remove lots of magic constants.
2004-06-05 19:02:52 +00:00
Skip Montanaro
58fc5d0813
Rewrote to use temporary files instead of StringIO objects in most places.
...
Goal is to work in the direction of universal newline support.
2004-06-05 17:03:20 +00:00
Andrew M. Kuchling
b7d8ce0275
[Bug #921657 ] Allow '@' in unquoted HTML attributes. Not strictly legal according to the HTML REC, but HTMLParser is already a pretty loose parser. Reported by Bernd Zimmermann.
2004-06-05 15:31:45 +00:00
Andrew M. Kuchling
ba8b6bc86f
[Bug #954364 ] inspect.getframeinfo() sometimes produces incorrect traceback line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me.
2004-06-05 14:11:59 +00:00
Hye-Shik Chang
39aef79821
Fix a bug that robotparser starves memory when the server responses
...
in HTTP/0.9 due to dissonance of httplib.LineAndFileWrapper and
urllib.addbase.
2004-06-05 13:30:56 +00:00
Andrew M. Kuchling
b12d97c275
[Bug #841757 ] Exercise handling of Unicode strings
2004-06-05 12:33:27 +00:00
Brett Cannon
0096e262ff
Refactored site.py into functions. Also moved over to using sets.
...
New regression test suite.
2004-06-05 01:12:51 +00:00
Hye-Shik Chang
3c145449da
Reuse width/iswide tests from strings_test. (Suggested by Walter Dörwald)
2004-06-04 04:24:54 +00:00
Hye-Shik Chang
7bd860655f
Fix typo.
2004-06-04 03:19:17 +00:00
Hye-Shik Chang
5f5125997b
Add iswide() and width() method for UserString according as the
...
addition to unicode objects.
2004-06-04 03:18:12 +00:00
Greg Ward
6186410db0
SF #965425 : fix so hyphenated words surrounded by punctuation are
...
wrapped correctly.
2004-06-03 01:59:41 +00:00
Walter Dörwald
118f931d07
Rename class attribute containing the class to be tested, so the name is the
...
same as for the string and sequence tests.
2004-06-02 18:42:25 +00:00
Andrew M. Kuchling
4ad9723ed8
Remove pre module
2004-06-02 17:40:14 +00:00
Hye-Shik Chang
974ed7cfa5
- SF #962502 : Add two more methods for unicode type; width() and
...
iswide() for east asian width manipulation. (Inspired by David
Goodger, Reviewed by Martin v. Loewis)
- Move _PyUnicode_TypeRecord.flags to the end of the struct so that
no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)
2004-06-02 16:49:17 +00:00
Vinay Sajip
7dc8ec9091
Copyright year changed
2004-06-02 10:51:05 +00:00
Tim Peters
1f4bcf9edd
test_hash(): The test here is different enough from the one in the bug
...
report that the stats for expected # of collisions are a little higher.
Updated comments accordingly.
2004-06-01 18:58:04 +00:00
Andrew M. Kuchling
09e2cb0ba7
[Bug #962631 ] Fix typo reported by Bryan Blackburn
2004-06-01 12:48:19 +00:00
Raymond Hettinger
41bd02256f
SF bug #942952 : Weakness in tuple hash
...
(Basic approach and test concept by Tim Peters.)
* Improved the hash to reduce collisions.
* Added the torture test to the test suite.
2004-06-01 06:36:24 +00:00
Martin v. Löwis
2a6ba9097e
Patch #963318 : Add support for client-side cookie management.
2004-05-31 18:22:40 +00:00
Walter Dörwald
0a6d0ff8d9
Port the dictionary tests from test_types.py to unittest. Collect as much
...
mapping tests as possible in mapping_test.py and reuse the tests in
test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py.
From SF patch #736962 .
2004-05-31 16:29:04 +00:00
Raymond Hettinger
027bb633b6
Add weakref support to sockets and re pattern objects.
2004-05-31 03:09:25 +00:00
Raymond Hettinger
cb87bc8e7e
Add weakref support to array.array and file objects.
2004-05-31 00:35:52 +00:00
Raymond Hettinger
691d80532b
Make sets and deques weak referencable.
2004-05-30 07:26:47 +00:00
Raymond Hettinger
1453e4aa75
* teach repr.repr() about collections.deque()
...
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger
ba6cd3647f
* Updated repr.py to handle set() and frozenset().
...
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Raymond Hettinger
83ee79524a
Add a test to verify an early call to iter() on the outermost for
...
expression.
2004-05-20 23:04:13 +00:00
Raymond Hettinger
354433a59d
SF patch #872326 : Generator expression implementation
...
(Code contributed by Jiwon Seo.)
The documentation portion of the patch is being re-worked and will be
checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).
The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch. Further additions are
welcome from everyone. Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Fred Drake
82903148a8
ConfigParser:
...
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651 )
2004-05-18 04:24:02 +00:00
Fred Drake
abc086fb0d
ConfigParser:
...
- don't allow setting options to non-string values; raise TypeError
when the value is set, instead of raising an arbitrary exception
later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843 )
2004-05-18 03:29:52 +00:00
Fred Drake
bc12b01d83
ConfigParser:
...
- ensure that option names in interpolations are handled by
self.optionxform in the same way that other references to option
names
- add tests, documentation
(closes SF bug #857881 , patch #865455 )
2004-05-18 02:25:51 +00:00
Tim Peters
ad9a7c4489
test_alias_nofallback(): Someone broke this test, after 2.3, by
...
converting it into assertRaises() form. Restored the 2.3 code, and
explained why assertRaises() cannot be used instead.
2004-05-16 05:36:30 +00:00
Greg Ward
f0ba764dbb
SF #847346 : merge from release23-maint branch: remove misguided
...
optimization for short input; beef up tests for fix_sentence_endings
feature.
2004-05-13 01:53:10 +00:00
Raymond Hettinger
0e371f2cb6
Make sure "del d[n]" is properly supported. Was necessary because the
...
same method that implements __setitem__ also implements __delitem__.
Also, there were several good use cases (removing items from a queue
and implementing Forth style stack ops).
2004-05-12 20:55:56 +00:00
Raymond Hettinger
300fa1d3b2
Temporarily disable doctest until genexps are in CVS
2004-05-10 14:08:42 +00:00
Raymond Hettinger
e7169eb9ed
Add more examples.
2004-05-09 01:15:01 +00:00
Raymond Hettinger
9d7c870c6d
SF #950057 : itertools.chain doesn't "process" exceptions as they occur
...
Both cycle() and chain() were handling exceptions only when switching
input sources. The patch makes the handle more immediate.
Will backport.
2004-05-08 19:49:42 +00:00
Martin v. Löwis
7d9c6c7e8c
Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848 .
...
Backported to 2.3.
2004-05-07 07:18:13 +00:00
Martin v. Löwis
9f1340b9f2
Do not use the default namespace for attributes.
...
Fixes http://bugs.debian.org/229885
Will backport to 2.3.
2004-05-02 20:37:13 +00:00
Walter Dörwald
c60c203670
Add a test script for the colorsys module.
2004-04-28 17:07:50 +00:00
Hye-Shik Chang
9f62eccb66
SF #926075 : Fixed the bug that returns a wrong pattern object for
...
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:30:07 +00:00
Martin v. Löwis
61e40bd897
Special case normalization of empty strings. Fixes #924361 .
...
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Raymond Hettinger
7892b1c651
* Add unittests for iterators that report their length
...
* Document the differences between them
* Fix corner cases covered by the unittests
* Use Py_RETURN_NONE where possible for dictionaries
2004-04-12 18:10:01 +00:00