Commit graph

5329 commits

Author SHA1 Message Date
Georg Brandl
5a096e1b10 Use new email module names (#1637162, #1637159, #1637157). 2007-01-22 19:40:21 +00:00
Georg Brandl
dd7b0525e9 Patch #1627441: close sockets properly in urllib2. 2007-01-21 10:35:10 +00:00
Georg Brandl
b84c13792d Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
2007-01-21 10:28:43 +00:00
Martin v. Löwis
aef4c6bc00 Patch #1610575: Add support for _Bool to struct. 2007-01-21 09:33:07 +00:00
Walter Dörwald
71cd55150b Port test_new.py to unittest. 2007-01-20 23:07:28 +00:00
Walter Dörwald
d414302eec resource.RUSAGE_BOTH might not exist. 2007-01-20 19:03:17 +00:00
Walter Dörwald
66262ab064 Add argument tests an calls of resource.getrusage(). 2007-01-20 18:19:33 +00:00
Walter Dörwald
9fab9a7da8 Port test_resource.py to unittest. 2007-01-20 17:28:31 +00:00
Neal Norwitz
06a9a0ccf4 This test doesn't pass on Windows. The cause seems to be that chmod
doesn't support the same funcationality as on Unix.  I'm not sure if
this fix is the best (or if it will even work)--it's a test to see
if the buildbots start passing again.

It might be better to not even run this test if it's windows (or non-posix).
2007-01-18 06:20:55 +00:00
Neal Norwitz
7beeb2b0a5 Try reverting part of r53145 that seems to cause the Windows buildbots to fail in test_uu.UUFileTest.test_encode 2007-01-18 05:40:58 +00:00
Sjoerd Mullender
33a0a06d31 Fixed ntpath.expandvars to not replace references to non-existing
variables with nothing.  Also added tests.
This fixes bug #494589.
2007-01-16 16:42:38 +00:00
Guido van Rossum
bb2cc698c1 Patch #1635058 by Mark Roberts: ensure that htonl and friends never accept or
return negative numbers, per the underlying C implementation.
2007-01-14 17:03:32 +00:00
Guido van Rossum
0567ba20f3 Remove a dependency of this test on $COLUMNS. 2007-01-14 03:46:33 +00:00
Peter Astrand
10514a70ac Fix for bug #1634343: allow specifying empty arguments on Windows 2007-01-13 22:35:35 +00:00
Brett Cannon
093b67061a Deprecate the sets module. 2007-01-13 00:29:49 +00:00
Raymond Hettinger
9fdfadb06e SF #1486663 -- Allow keyword args in subclasses of set() and frozenset(). 2007-01-11 18:22:55 +00:00
Raymond Hettinger
51c2f6cd18 Fix zero-length corner case for iterating over a mutating deque. 2007-01-08 18:09:20 +00:00
Raymond Hettinger
769a40a1d0 Fix stability of heapq's nlargest() and nsmallest(). 2007-01-04 17:53:34 +00:00
Brett Cannon
92d54d5e9c Add EnvironmentVarGuard to test.test_support. Provides a context manager to
temporarily set or unset environment variables.
2007-01-04 00:23:49 +00:00
Raymond Hettinger
5399910eba For sets with cyclical reprs, emit an ellipsis instead of infinitely recursing. 2006-12-30 04:01:17 +00:00
Lars Gustäbel
a7ba6fc548 Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
Will backport to 2.5.
2006-12-27 10:30:46 +00:00
Lars Gustäbel
a4b2381b20 Patch #1262036: Prevent TarFiles from being added to themselves under
certain conditions.

Will backport to 2.5.
2006-12-23 17:57:23 +00:00
Lars Gustäbel
6baa502769 Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
work correctly together with readline().

Will backport to 2.5.
2006-12-23 16:40:13 +00:00
Andrew M. Kuchling
55c54a2fa1 Frak; this test also fails 2006-12-22 21:48:19 +00:00
Andrew M. Kuchling
f2881e8315 Darn; this test works when you run test_pty.py directly, but fails when regrtest runs it (the os.read() raises os.error). I can't figure out the cause, so am commenting out the test. 2006-12-22 19:21:27 +00:00
Andrew M. Kuchling
ee0e6d16b3 [Patch #783050 from Patrick Lynch] The emulation of forkpty() is incorrect;
the master should close the slave fd.

Added a test to test_pty.py that reads from the master_fd after doing
a pty.fork(); without the fix it hangs forever instead of raising an
exception.  (<crossing fingers for the buildbots>)

2.5 backport candidate.
2006-12-22 18:41:42 +00:00
Andrew M. Kuchling
3fa5e6ee45 [Bug #776202] Apply Walter Doerwald's patch to use text mode for encoded files 2006-12-22 16:43:26 +00:00
Andrew M. Kuchling
9ef0ef5b72 [Bug #802128 continued] Modify mode depending on the process umask.
Is there really no other way to read the umask than to set it?

Hope this works on Windows...
2006-12-22 15:16:58 +00:00
Andrew M. Kuchling
dc26758ffe [Bug #802128] Make the mode argument of dumbdbm actually work the way it's
described, and add a test for it.

2.5 bugfix candidate, maybe; arguably this patch changes the API of
dumbdbm and shouldn't be added in a point-release.
2006-12-22 15:04:45 +00:00
Georg Brandl
ded1c4df0b Testcase for patch #1484695. 2006-12-20 11:55:16 +00:00
Raymond Hettinger
94547f7646 Bug #1590891: random.randrange don't return correct value for big number
Needs to be backported.
2006-12-20 06:42:06 +00:00
Brett Cannon
6d9520c4f0 Add test.test_support.guard_warnings_filter . This function returns a context
manager that protects warnings.filter from being modified once the context is
exited.
2006-12-13 23:09:53 +00:00
Brett Cannon
c745df8519 Remove unneeded imports of 'warnings'. 2006-12-13 23:02:38 +00:00
Brett Cannon
905820ccba Remove an unneeded import of 'warnings'. 2006-12-13 22:31:37 +00:00
Walter Dörwald
da1ad32cec Fix typo. 2006-12-12 21:55:31 +00:00
Raymond Hettinger
c789f341bb Add test for SF bug 1576657 2006-12-08 17:35:25 +00:00
Georg Brandl
87fa559479 Patch #1610437: fix a tarfile bug with long filename headers. 2006-12-06 22:21:18 +00:00
Martin v. Löwis
a00bcac003 Patch #1371075: Make ConfigParser accept optional dict type
for ordering, sorting, etc.
2006-12-03 12:01:53 +00:00
Walter Dörwald
f008203cb4 Move xdrlib tests from the module into a separate test script,
port the tests to unittest and add a few new tests.
2006-12-01 16:59:47 +00:00
Michael W. Hudson
f390442130 a test for an error condition not covered by existing tests
(noticed this when writing the equivalent code for pypy)
2006-11-23 13:54:04 +00:00
Walter Dörwald
39b8b6afb5 Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))
SF bug #1601501.
2006-11-23 05:03:56 +00:00
Martin v. Löwis
07529354db Patch #1070046: Marshal new-style objects like InstanceType
in xmlrpclib.
2006-11-19 18:51:54 +00:00
Andrew M. Kuchling
9eec51c04f Add a test case of data w/ bytes > 127 2006-11-19 18:40:01 +00:00
Martin v. Löwis
cffcc8b195 Make cStringIO.truncate raise IOError for negative
arguments (even for -1). Fixes the last bit of
#1359365.
2006-11-19 10:41:41 +00:00
Georg Brandl
283a1353a0 Patch [ 1586791 ] better error msgs for some TypeErrors 2006-11-19 08:48:30 +00:00
Andrew M. Kuchling
db4f255c61 Expand checking in test_sha 2006-11-18 22:17:33 +00:00
Andrew M. Kuchling
8c456f3b57 Remove file-locking in MH.pack() method.
This change looks massive but it's mostly a re-indenting after
removing some try...finally blocks.

Also adds a test case that does a pack() while the mailbox is locked; this
test would have turned up bugs in the original code on some platforms.

In both nmh and GNU Mailutils' implementation of MH-format mailboxes,
no locking is done of individual message files when renaming them.

The original mailbox.py code did do locking, which meant that message
files had to be opened.  This code was buggy on certain platforms
(found through reading the code); there were code paths that closed
the file object and then called _unlock_file() on it.

Will backport to 25-maint once I see how the buildbots react to this patch.
2006-11-17 13:30:25 +00:00
Georg Brandl
25aabf4cbb Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
2006-11-16 17:08:45 +00:00
Martin v. Löwis
065f0c8a06 Patch #1355023: support whence argument for GzipFile.seek. 2006-11-12 10:41:39 +00:00
Martin v. Löwis
040a927cd1 Patch #1065257: Support passing open files as body in
HTTPConnection.request().
2006-11-12 10:32:47 +00:00