Commit Graph

1625 Commits

Author SHA1 Message Date
Neal Norwitz
bfff5a720a Try to get test to pass on Windows 2002-09-07 05:58:28 +00:00
Neal Norwitz
df4626fb8a Backport of SF bug # 585792, Invalid mmap crashes Python interpreter
Raise ValueError if user passes a size to mmap which is larger
than the file.

Also need Tim's fix in test_mmap.py, 1.22 which flushes the file
before mmap'ing it.
2002-09-05 22:30:03 +00:00
Michael W. Hudson
f2a62c37a6 backport gvanrossum's checkin of
revision 1.19 of test_weakref.py

SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.
2002-08-23 16:29:27 +00:00
Michael W. Hudson
bb580d3eda backport montanaro's checkin of
revision 1.9 of test_gzip.py

force gzip module to open files using 'b'inary mode.
closes patch #536278.
2002-08-23 16:10:13 +00:00
Michael W. Hudson
caa276401b backport gvanrossum's checkin of
revision 1.22 of test_fcntl.py

SF 554663.  Add OpenBSD3.  Bugfix candidate if anyone cares.
2002-08-23 16:06:46 +00:00
Michael W. Hudson
94da31bb97 backport tim_one's checkin of
revision 1.21 of test_mmap.py

SF bug 544733:  Cygwin test_mmap fix for Python 2.2.1
Close a file before trying to unlink it, and apparently Cygwin needs
writes to an mmap'ed file to get flushed before they're visible.

Bugfix candidate, but I think only for the 2.2 line (it's testing
features that I think were new in 2.2).
2002-08-23 15:50:57 +00:00
Guido van Rossum
96303ce055 Fix some endcase bugs in unicode rfind()/rindex() and endswith().
These were reported and fixed by Inyeol Lee in SF bug 595350.  The
endswith() bug is already fixed in 2.3; I'll fix the others in
2.3 next.
2002-08-20 16:57:58 +00:00
Tim Peters
4c7e2022a9 A trip down memory lane. Barry checked in this test with 2.3-style
imports of test_support.  That causes multiple copies of test_support
to get loaded, and the one used by test_base64.py didn't see the proper
value of verbose=False, so spewed output.  That in turn apparenly caused
Barry to check in an expected-results output file, but a unitttest-based
test should never have one of those.  I noticed this because, on Windows,
the final unittest output line contains the number of seconds needed to
run the test, and that varied on *some* runs when I tried it, causing
bogus test failures.

Anyway, this gets rid of the expected-output file again, and changes
the imports to work with 2.2's way of doing this.
2002-08-19 01:20:09 +00:00
Barry Warsaw
0c25da5823 Backport of fix for SF bug #595671 from Python 2.3cvs:
base64.decodestring('') should return '' instead of raising an
    exception.  The bug fix for SF #430849 wasn't quite right.  This
    closes SF bug #595671.  I'll backport this to Python 2.2.

One addition here is that there was no test of the base64 module in
Python 2.2 cvs yet, so I added that too.
2002-08-15 22:18:11 +00:00
cvs2svn
3218fa4df6 This commit was manufactured by cvs2svn to create branch
'release22-maint'.
2002-08-15 22:18:11 +00:00
Guido van Rossum
f75ba0b6e5 Backport:
SF patch 588728 (Nathan Srebro).

The __delete__ method wrapper for descriptors was not supported

(I added a test, too.)
2002-08-01 19:03:43 +00:00
Tim Peters
ef84b97c7a Use sys.executable to run Python, as suggested by Neal Norwitz. 2002-07-17 00:42:52 +00:00
Tim Peters
a01421bbc7 The atexit module effectively turned itself off if sys.exitfunc already
existed at the time atexit first got imported.  That's a bug, and this
fixes it.

Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.
2002-07-16 20:09:08 +00:00
Guido van Rossum
b7eda1d570 Backport:
Remove httplib from tested modules.

The test of httplib makes it difficult to maintain httplib.  There are
two many idioms that pyclbr doesn't seem to understand, and I don't
understand how to update these tests to make them work.

Also remove commented out test of urllib2.
2002-07-12 16:03:09 +00:00
Jeremy Hylton
fde8acacdc Update output for new tests. 2002-07-12 15:52:26 +00:00
Jeremy Hylton
799e99b1c0 Backport changes.
Change _begin() back to begin().
Fix for SF bug 579107.
Fix for SF bug #432621: httplib: multiple Set-Cookie headers
Fix SF bug #575360
Handle HTTP/0.9 responses.
2002-07-12 14:23:43 +00:00
Tim Peters
f460e9b635 subtype_resurrection(): Removed unused import. 2002-07-11 18:40:12 +00:00
Tim Peters
a17fb2c8e6 subtype_resurrection(): The test suite with -l properly reported the
immortal object here as a leak.  Made the object mortal again at the end.
2002-07-11 18:30:02 +00:00
Tim Peters
7b63f46f3a Repaired optimistic comment in new test. 2002-07-11 07:11:13 +00:00
Tim Peters
8156b9019c Attempting to resurrect a dying instance of a new-style class in a
__del__ method died with

    Fatal Python error: GC object already in linked list

in both release and debug builds.  Fixed that.  Added a new test that
dies without the fix.
2002-07-11 07:06:44 +00:00
Jeremy Hylton
feb7d02427 Track change of begin() to _begin(). 2002-07-02 20:39:37 +00:00
Raymond Hettinger
d605adfe2d Fix SF Bug 572567: Memory leak in object comparison 2002-06-24 13:25:41 +00:00
Guido van Rossum
29cb1d737e Test for the bug in recurse_down_subclasses() that I just fixed. 2002-06-14 02:37:00 +00:00
Guido van Rossum
a9d29fed54 Backport:
Fix for SF bug 532646.  This is a little simpler than what Neal
suggested there, based upon a better analysis (__getattr__ is a red
herring).
[This might be a 2.1 bugfix candidate we well, if people care]
2002-06-13 21:36:35 +00:00
Guido van Rossum
76c63a4980 Backport 1.15:
Add a testcase to ensure that cycles going through the __class__ link
of a new-style instance are detected by the garbage collector.
2002-06-12 14:41:50 +00:00