Benjamin Peterson
c262a69f54
an AttributeError is perfectly acceptable here
2010-06-30 18:41:08 +00:00
Giampaolo Rodolà
e00e2f0082
fix issue #6589 : cleanup asyncore.socket_map if smtpd.SMTPServer constructor raises an exception
2010-06-30 17:38:28 +00:00
Benjamin Peterson
10947a6416
mark test depending on ref counting
2010-06-30 17:11:08 +00:00
Mark Dickinson
070f0abc19
Issue #9125 : Update parser module for "except ... as ..." syntax.
2010-06-30 16:27:57 +00:00
Mark Dickinson
858624944c
Spelling.
2010-06-29 07:37:25 +00:00
Benjamin Peterson
d6a8e6d234
fix skipping condition
2010-06-28 15:41:06 +00:00
Benjamin Peterson
8eeb1dcbbc
testcapi tests are definitely cpython only
2010-06-28 15:36:40 +00:00
Senthil Kumaran
5871a8d744
Fix Issue8653 - Docstring for urlunsplit function.
2010-06-28 13:56:46 +00:00
Benjamin Peterson
a70e91c284
mark tracking tests as implementation details
2010-06-27 22:40:26 +00:00
Ronald Oussoren
b96fbb8d00
Fix for Issue8883: without this patch test_urllib will fail
...
when there is a bare IP address in the "Bypass proxy settings
for these Hosts & Domains" list on MacOSX.
2010-06-27 13:59:39 +00:00
Ronald Oussoren
76002c8f1d
The uuid library on OSX 10.5 seems to contain the same bug as the one
...
on OSX 10.6, therefore don't use it there either.
This fixes issue8621.
2010-06-27 12:43:47 +00:00
Ronald Oussoren
cd17213e8e
Two small fixes for the support for SDKs on MacOSX:
...
1) The code that checks if an path should be located in the SDK
explicitly excludes /usr/local. This fixes issue9046
2) The SDK variant for filtering "db_dirs_to_check" in setup.py
was not doing anything because of a missing assignment.
2010-06-27 12:36:16 +00:00
Georg Brandl
ad72bcc864
Untabify.
2010-06-27 11:24:15 +00:00
R. David Murray
62a14db9f4
#9085 : email versions have gotten out of sync, 2.7 is actually 4.0.3.
...
In 2.5 the email version was bumped to 4.0.2 just before release but
after the maintenance branch was set up. The bump was not backported
to trunk, and 2.6 went out the door with a version number of 4.0.1.
I bumped this to 4.0.2 because of a behavior change, but that makes
it look the same as 2.5. So bump it again to 4.0.3.
2010-06-26 18:39:50 +00:00
R. David Murray
04a3439ba6
Fix indentation in recently added test.
2010-06-26 03:27:32 +00:00
R. David Murray
32e0681156
#4640 : add a test to optparse that proves issue is invalid.
2010-06-26 00:06:44 +00:00
Benjamin Peterson
cf3e20c8e8
mark implementation detail as such
2010-06-25 22:58:47 +00:00
Benjamin Peterson
0badae4748
this must be a typo
2010-06-25 21:19:04 +00:00
Benjamin Peterson
4b26acbf03
mark implementation detail as such
2010-06-25 20:34:01 +00:00
Benjamin Peterson
947ce58a90
prevent assignment to set literals
2010-06-24 00:12:40 +00:00
Benjamin Peterson
f6d31cb8b5
cpython only gc tests
2010-06-23 20:29:26 +00:00
Benjamin Peterson
7f8ede4db9
mark ref counting as impl detail
2010-06-22 20:32:02 +00:00
Benjamin Peterson
694781b1d3
must force gc here
2010-06-22 20:26:20 +00:00
Benjamin Peterson
bde67df0cd
keep UserDict an old-style class
...
Be generous in abc.py to allow this.
2010-06-22 18:09:02 +00:00
Ronald Oussoren
934f4e1f39
Fix for issue8446:
...
* Don't import 'ic' in webbrowser, that module is no longer used
* Remove 'MacOS' from the list of modules that should emit a Py3kWarning on import.
This is needed because one of the earlier tests triggers and import of this
extension, and that causes a failure in test_py3kwarn (running test_py3kwarn
separately worked fine)
With these changes 'make tests' no longer says that test_py3kwarn fails.
2010-06-22 09:18:28 +00:00
Benjamin Peterson
bfcedf4cb7
bump verson to 2.7rc2
2010-06-21 15:57:57 +00:00
Benjamin Peterson
bb937092f7
update pydoc-topics
2010-06-21 15:56:45 +00:00
Benjamin Peterson
afa1b30969
fix finding visual studio 2008 on 64 bit #8854
2010-06-21 15:27:46 +00:00
Thomas Heller
a45e6d5791
Add tests for problems reported in issue 8959.
2010-06-21 15:01:18 +00:00
Thomas Heller
f180099ec6
Fix #8959 by reverting revision 80761.
2010-06-21 14:00:24 +00:00
Mark Dickinson
801923681c
Merge test_strtod and test_float string-to-float conversion tests.
2010-06-20 18:50:19 +00:00
Jean-Paul Calderone
b33f0c1ccd
Revert r60115
...
This revision introduced quoting for strings containing | based
on a misunderstanding of the commonly used quoting rules used
on Windows.
| is interpreted by cmd.exe, not by the MS C runtime argv initializer.
It only needs to be quoted if it is part of an argument passed through
cmd.exe.
See issue1300, issue7839, and issue8972.
2010-06-18 20:00:17 +00:00
Florent Xicluna
a37b7af4d7
Add few words about test.test_genericpath.CommonTest
2010-06-17 20:30:56 +00:00
R. David Murray
df1cf301c2
#8720 : fix inspect regression by teaching getsourcefile about linecache.
...
The fix for issue 4050 caused a regression: before that fix, source
lines in the linecache would eventually be found by inspect. After the
fix inspect reports an error earlier, and the source isn't found.
The fix for the fix is to have getsourcefile look in the linecache for
the file and return the psuedo-filename if the source is there, just as
it already returns it if there is a PEP 302 loader.
2010-06-17 01:36:52 +00:00
Mark Dickinson
e979ec8fbf
Issue #8986 : erfc was raising OverflowError on Linux for arguments in
...
the (approximate) range (-27.3, 30.0), as a result of an escaped errno
value.
2010-06-13 10:50:29 +00:00
Vinay Sajip
936efc791a
Issue #8924 : logging: Improved error handling for Unicode in exception text.
2010-06-11 22:56:50 +00:00
Antoine Pitrou
cca3a3f396
Issue #8941 : decoding big endian UTF-32 data in UCS-2 builds could crash
...
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
2010-06-11 21:42:26 +00:00
Mark Dickinson
40228912c8
Fix possible undefined behaviour from signed overflow in struct module.
...
Backport of revisions 81897, 81898 and 81902 from py3k.
2010-06-11 20:27:05 +00:00
Michael Foord
33958b87f2
Fix issue with nested test suites debug method and module setups. (unittest)
2010-06-10 20:40:21 +00:00
Michael Foord
ae1bb9a00c
Typo correction.
2010-06-09 12:29:56 +00:00
Michael Foord
0fedb28951
Issue 8948. cleanup functions are not run by unittest.TestCase.debug(), plus class and module teardowns are not run by unittest.TestSuite.debug().
2010-06-08 22:44:52 +00:00
Benjamin Peterson
eabdeba25e
use unicode literals
2010-06-07 22:33:09 +00:00
Benjamin Peterson
13e934acc0
correctly overflow when indexes are too large
2010-06-07 22:23:23 +00:00
Ezio Melotti
0b41707dde
Silence deprecation warning in test___all__ caused by an import bsddb.
2010-06-07 22:00:18 +00:00
Benjamin Peterson
0229e8495f
update pydoc-topics
2010-06-06 00:49:27 +00:00
Benjamin Peterson
77d534e59d
bump version to 2.7 rc1
2010-06-06 00:22:09 +00:00
Michael Foord
c532c57d44
Code formatting change.
2010-06-05 23:58:40 +00:00
Ezio Melotti
62c3c79426
Replace deprecated fail* methods with the equivalent assert* ones.
2010-06-05 22:28:10 +00:00
Michael Foord
db919f0188
Tests for issue 8302, skipped test in a setUpClass or a setUpModule are reported as skips rather than errors.
2010-06-05 20:59:00 +00:00
Michael Foord
c1d7c5b7fa
Tests for unittest.TestCase.maxDiff.
2010-06-05 20:33:43 +00:00
Michael Foord
20e287caed
Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error.
2010-06-05 19:38:42 +00:00
Ezio Melotti
ab2eb0ee84
Add a NEWS entry for r81758 and clarify a comment.
2010-06-05 19:21:32 +00:00
Ezio Melotti
e57e50c8e7
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
...
1) #8271 : when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in
RFC 3629, but leave it commented out since it's not backward compatible;
4) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
5) Add an extensive set of tests in test_unicode;
6) Fix test_codeccallbacks because it was failing after this change.
2010-06-05 17:51:07 +00:00
Michael Foord
f2c25c5cb0
Fix unittest tests after previous commit.
2010-06-05 13:48:27 +00:00
Michael Foord
5fe21ff91a
unittest.TestCase assertion methods inform you when they have omitted an over long diff on failure. Issue 8351.
2010-06-05 13:38:16 +00:00
Mark Dickinson
ec27d91741
Fix test_py3kwarn not to test for __cmp__-related DeprecationWarning.
2010-06-05 13:18:33 +00:00
Michael Foord
674648e3f2
unittest.TestCase.assertDictEqual and assertMultilineEqual provide better default failure messages in the event of long diffs.
2010-06-05 12:58:39 +00:00
Michael Foord
e37d75fce2
Removed the new max_diff argument to assertSequenceEqual. All unittest.TestCase assert methods that use difflib to produce failure messages now truncate overly long messages. New class attribute unittest.TestCase.maxDiff to configure this if necessary. Issue 8351.
2010-06-05 12:10:52 +00:00
Mark Dickinson
23f0d6b57b
Issue #8627 : remove out-of-date warning about overriding __cmp__
2010-06-05 11:52:24 +00:00
Michael Foord
a441287f79
Extract error message truncating into a method (unittest.TestCase._truncateMessage).
2010-06-05 11:46:59 +00:00
Michael Foord
0100702b9a
Issue 8351. Suppress large diffs in unittest.TestCase.assertSequenceEqual.
2010-06-05 11:23:51 +00:00
Michael Foord
9ef5d33084
unittest TestLoader test discovery filename matching done in a method. This makes it easier to override the matching strategy in subclasses. No behaviour change in actual implementation.
2010-06-05 10:39:42 +00:00
Benjamin Peterson
2aa6c38237
properly lookup the __format__ special method
2010-06-05 00:32:50 +00:00
R. David Murray
e7e505ba6e
#4487 : have Charset check with codecs for possible aliases.
...
Previously, unexpected results occurred when email was passed, for example,
'utf8' as a charset name, since email would accept it but would *not* use
the 'utf-8' codec for it, even though Python itself recognises that as
an alias for utf-8. Now Charset checks with codecs for aliases as well
as its own internal table. Issue 8898 has been opened to change this
further in py3k so that all aliasing is routed through the codecs module.
2010-06-04 19:51:06 +00:00
Martin v. Löwis
eba67c0eac
Issue #6470 : Drop UNC prefix in FixTk.py
...
Patch by Christop Gohlke and Amaury Forgeot d'Arc.
2010-06-04 19:39:07 +00:00
Senthil Kumaran
fb6950140a
test verifying the resp object is closed for HEAD response.
2010-06-04 17:17:09 +00:00
Senthil Kumaran
dfaced5d3d
Fix issue6312 - close the resp object for HEAD response.
2010-06-04 16:32:14 +00:00
Benjamin Peterson
3b95934e05
use a set for membership testing
2010-06-03 21:21:03 +00:00
R. David Murray
4653fb556c
#8889 : rewrite transient_internet so we don't use EAI_NODATA on FreeBSD.
...
FreeBSD doesn't have socket.EAI_NODATA. I rewrote the routine because
there's no easy way to conditionally include a context manager in a
with statement. As a side benefit, instead of a stack of context
managers there's now only one.
2010-06-03 20:19:25 +00:00
R. David Murray
61746d580e
#5610 : use \Z not $ so we don't eat extra chars when body part ends with \r\n.
...
If a body part ended with \r\n, feedparser, using '$' to terminate its
search for the newline, would match on the \r\n, and think that it needed
to strip two characters in order to account for the line end before the
boundary. That made it chop one too many characters off the end of
the body part. Using \Z makes the match correct.
Patch and test by Tony Nelson.
2010-06-03 15:43:20 +00:00
Stefan Krah
449aa86bd6
Issue #7384 : If the system readline library is linked against ncurses,
...
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.
Thanks Thomas Dickey for answering questions about ncurses/ncursesw
and readline!
2010-06-03 12:39:50 +00:00
Lars Gustäbel
4da7d410b3
Issue #8741 : Fixed the TarFile.makelink() method that is responsible
...
for extracting symbolic and hard link entries as regular files as a
work-around on platforms that do not support filesystem links.
This stopped working reliably after a change in r74571. I also added
a few tests for this functionality.
2010-06-03 12:34:14 +00:00
Lars Gustäbel
2ee9c6fa50
Issue #8833 : tarfile created hard link entries with a size
...
field != 0 by mistake. The associated testcase did not
expose this bug because it was broken too.
2010-06-03 09:56:22 +00:00
Ronald Oussoren
593e4ca7a5
Fix for issue #7724 : ensure that distutils and python's own setup.py
...
honor the MacOSX SDK when one is specified.
This is needed to be able to build using the 10.4u SDK while running
on OSX 10.6.
This is a fixed version of the patch in r80963, I've tested this patch
on OSX and Linux.
2010-06-03 09:47:21 +00:00
R. David Murray
52dcd45906
#1368247 : make set_charset/MIMEText automatically encode unicode _payload.
...
Fixes (mysterious, to the end user) UnicodeErrors when using utf-8 as
the charset and unicode as the _text argument. Also makes the way in
which unicode gets encoded to quoted printable for other charsets more
sane (it only worked by accident previously). The _payload now is encoded
to the charset.output_charset if it is unicode.
2010-06-02 22:03:15 +00:00
Vinay Sajip
3b4849a21d
Logging: improved error reporting for BaseConfigurator.resolve().
2010-06-02 10:05:31 +00:00
Brian Curtin
824912eb30
Fix #8618 . Ask the Windows mixer API if there are any playback devices
...
configured before attempting to test PlaySound.
2010-06-01 13:29:13 +00:00
Senthil Kumaran
4f0108b0d9
Fix Issue8797 - urllib2 basic authentication fix for wrong passwords. It fails after 5 retries.
2010-06-01 12:40:07 +00:00
Mark Dickinson
4ca7c3c089
Issue #8748 : Fix incorrect results from comparisons between an integer
...
and a complex instance. Based on a patch by Meador Inge.
2010-05-30 13:18:10 +00:00
Mark Dickinson
813363743d
Issue #5211 : Complete removal of implicit coercions for the complex
...
type. Coercion for arithmetic operations was already removed in
r78280, but that commit didn't remove coercion for rich comparisons.
2010-05-30 12:12:25 +00:00
Brian Curtin
83cba05c30
Fix #8405 for slow buildbots. Remove the sleep on startup and move the
...
pipe communication into a loop to retry in case a buildbot gets even slower.
2010-05-28 15:49:21 +00:00
Benjamin Peterson
29d438c96c
remove non-ascii coding per PEP 8
2010-05-28 02:12:36 +00:00
Victor Stinner
03883624a4
Issue #8835 : test_support.transient_internet() catchs gaierror(EAI_NONAME) and
...
gaierror(EAI_NODATA)
2010-05-27 22:29:48 +00:00
Alexander Belopolsky
9292ee0667
Issue #7150 : Raise OverflowError if the result of adding or subtracting
...
timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
2010-05-27 20:55:27 +00:00
Alexander Belopolsky
58451d2dd7
Issue #7879 : Skip negative timestamps test on any Windows platform
...
using unittest.skipIf decorator.
2010-05-26 20:45:37 +00:00
Alexander Belopolsky
a26cf46dd4
Issue #7879 : Do not test negative timestamps on any Windows platform
...
including Windows CE.
2010-05-26 19:43:16 +00:00
Mark Dickinson
784a47f2c0
Issue #8825 : additional testcases for int(string, 0) and long(string, 0).
2010-05-26 19:06:33 +00:00
Victor Stinner
708c0727f9
Issue #7449 : Skip test_socketserver if threading support is disabled
2010-05-26 17:25:28 +00:00
Victor Stinner
c49dfcc8dc
Issue #3798 : Write sys.exit() message to sys.stderr to use stderr encoding and
...
error handler, instead of writing to the C stderr file in utf-8
2010-05-25 22:30:32 +00:00
Mark Dickinson
ecb8316885
Fix a NameError in test_enumerate.
2010-05-25 19:44:49 +00:00
Mark Dickinson
2066559913
Issue #8816 : Extra tests for some built-in functions. These tests are
...
ports of IronPython tests. Thanks Gregory Nofi.
2010-05-25 19:01:08 +00:00
R. David Murray
bfbdefe539
Issue 8143: sync unquote in urlparse with urllib; add comment about doing so.
...
unquote is duplicated in the two files to avoid a circular reference.
(This is fixed in Python3.) Updates keep getting made to the public unquote
without fixing the urlparse one, however, so this fix syncs the two
and adds a comment to both to make sure changes are applied to both.
2010-05-25 15:20:46 +00:00
Brian Curtin
b64c89bd7a
Fix #2810 - handle the case where some registry calls return
...
ERROR_MORE_DATA, requiring another call to get the remaining data.
Patch by Daniel Stutzbach
2010-05-25 15:06:15 +00:00
Victor Stinner
554a3b82e4
Issue #6662 : Fix parsing of malformatted charref (&#bad;)
2010-05-24 21:33:24 +00:00
Georg Brandl
f0757a2937
#8016 : add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.)
2010-05-24 21:29:07 +00:00
Steven Bethard
dce6e1bd5a
Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html
2010-05-24 03:45:26 +00:00
Benjamin Peterson
36cd75ab8d
Merged revisions 80937,81478 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r80937 | benjamin.peterson | 2010-05-07 14:10:58 -0500 (Fri, 07 May 2010) | 1 line
remove redundant unicode call
........
r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line
ensure doctests have some future_features
........
2010-05-22 18:52:21 +00:00
Victor Stinner
54b40ee929
Fix my last commit (r81471) about codecs
...
Rememder: don't touch the code just before a commit
2010-05-22 13:44:25 +00:00
Victor Stinner
7df55dad3b
Issue #6268 : More bugfixes about BOM, UTF-16 and UTF-32
...
* Fix seek() method of codecs.open(), don't write the BOM twice after seek(0)
* Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes
* test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by
Solaris or Windows, but does it really exist? I found it the in the issue.
2010-05-22 13:37:56 +00:00
Georg Brandl
a19baf58e6
Underscore the name of an internal utility function.
2010-05-22 11:31:16 +00:00
Georg Brandl
5d0ca2c832
Issue #3924 : Ignore cookies with invalid "version" field in cookielib.
2010-05-22 11:29:19 +00:00
Victor Stinner
262be5e70b
Issue #6268 : Fix seek() method of codecs.open(), don't read the BOM twice
...
after seek(0)
2010-05-22 02:11:07 +00:00
Victor Stinner
d6703b5e38
Issue #5640 : Fix Shift-JIS incremental encoder for error handlers different
...
than strict
2010-05-21 22:50:28 +00:00
Benjamin Peterson
26da187193
simplify and modernize updatecache()
2010-05-21 21:35:44 +00:00
Benjamin Peterson
b9e7c01294
remove debugging rubish
2010-05-21 21:32:49 +00:00
Benjamin Peterson
266e454866
ensure the last line has a trailing newline #8782
2010-05-21 21:31:24 +00:00
Benjamin Peterson
bd289dae35
fix name
2010-05-21 21:17:22 +00:00
Benjamin Peterson
6722ac2f00
use addCleanup
2010-05-21 21:16:12 +00:00
Benjamin Peterson
eb318d3b16
return NotImplemented from Mapping when comparing to a non-mapping #8729
2010-05-21 20:51:45 +00:00
Brett Cannon
eb3cd301ae
Turned out that if you used explicit relative import syntax
...
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902 . Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Victor Stinner
b1556c537d
libpython.py: fix support of non-BMP unicode characters
...
Forward port some code from Python3:
* join surrogate pairs if sizeof(Py_UNICODE)==2
* Enable non-BMP test on narrow builds using u"\U0001D121" instead of
unichr(0x1D121)
2010-05-20 11:29:45 +00:00
Tarek Ziadé
8f692275e9
#8759 : Fixed user paths in sysconfig for posix and os2 schemes
2010-05-19 22:20:14 +00:00
Stefan Krah
8a6f3fe3b5
Fix typos in docstrings.
2010-05-19 15:46:39 +00:00
Giampaolo Rodolà
e3a84e857f
Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
2010-05-18 20:04:31 +00:00
Antoine Pitrou
83137c2e16
Issue #7079 : Fix a possible crash when closing a file object while using
...
it from another thread. Patch by Daniel Stutzbach.
2010-05-17 19:56:59 +00:00
Florent Xicluna
af87f9f09f
Issue #1285086 : Speed up urllib.quote and urllib.unquote for simple cases.
2010-05-17 13:35:09 +00:00
Tarek Ziadé
4fc2a008b8
upgraded distutils docs w.r.t. the manifest regeneration
2010-05-17 10:54:43 +00:00
Florent Xicluna
e127e24359
Slight style cleanup.
2010-05-17 10:39:07 +00:00
Tarek Ziadé
422545f0e7
Fixed #8688 : Distutils now recalculates MANIFEST everytime.
2010-05-17 10:06:20 +00:00
Victor Stinner
8a470d6039
Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()
...
fo is not set if the open() fails.
2010-05-16 00:34:40 +00:00
Benjamin Peterson
5b5134b8d1
use TestCase skip method
2010-05-15 17:48:55 +00:00
Stefan Krah
7622eba757
If the timeout is exceeded, count the tests as skipped instead of just
...
issuing a warning.
2010-05-15 09:31:08 +00:00
Victor Stinner
2b271f7e30
Fix regression introduced by r81154 (Issue #5099 , subprocess destructor)
2010-05-14 21:52:26 +00:00
Brett Cannon
42a0ba7b2c
subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
...
interpreter shutdown semantics. Same issue goes for the methods that __del__
called. Now all the methods capture the global objects it needs as default
values to private parameters (could have stuck them on the class object itself,
but since the objects have nothing directly to do with the class that seemed
wrong).
There is no test as making one that works is hard. This patch was
verified against a consistently failing test in Mercurial's test suite, though,
so it has been tested in some regard.
Closes issue #5099 . Thanks to Mary Stern for the bug report and Gabriel
Genellina for writing another patch for the same issue and attempting to write
a test.
2010-05-14 00:21:48 +00:00
Brett Cannon
da9af75d5f
test_site was failing under darwin for non-framework builds because a test was
...
assuming framework-specific site-packages directories were being used.
2010-05-13 23:59:41 +00:00
Florent Xicluna
b3d0554040
Revert changeset r81150 which helped diagnose issue #8423 on some OS X buildbot.
2010-05-13 23:46:48 +00:00
Florent Xicluna
9cf210f392
Improve test feedback to troubleshoot issue #8423 on OS X.
2010-05-13 21:41:05 +00:00
Florent Xicluna
9ac6114dc9
Better test skipping, with message in the log.
2010-05-13 21:40:01 +00:00
Florent Xicluna
8652f2e83e
Revert the additional OS X information (r81140). Keep the endianness information.
2010-05-13 18:16:06 +00:00
Florent Xicluna
b7d413f9bc
Add sensible information about the OS X platform to diagnose issue #8423 :
...
test_pep277 fails on "x86 Tiger" buildbot but not on "PPC Tiger".
2010-05-13 17:05:29 +00:00
Victor Stinner
37368163bd
Fix verb tense in skip message.
...
Ooops, merge also r80334 (patch by r.david.murray)
2010-05-13 16:22:15 +00:00
Victor Stinner
20c3258bf2
Issue #8422 , test_genericpath: skip the creation of a directory with an invalid
...
UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
string).
Merge r80163 from py3k branch.
2010-05-13 16:18:14 +00:00
Senthil Kumaran
81a0450cb5
Fix Issue8657 - adding git and git+ssh as know schemes.
2010-05-13 03:25:21 +00:00
Mark Dickinson
62f7e8b0b8
Fix unused variable in test_factorial.
2010-05-12 19:53:36 +00:00
Giampaolo Rodolà
fd25594aa4
Removed the assertion that dispatcher.connected attribute must be False after a single connect() call. Solaris and FreeBSD buildbots failures showed how connect() can succeed even in a single call. All bo failures should definitively be fixed now.
2010-05-12 00:29:27 +00:00
Antoine Pitrou
fc3bfad2e0
Issue #8681 : Make the zlib module's error messages more informative when
...
the zlib itself doesn't give any detailed explanation.
2010-05-11 23:42:28 +00:00
Antoine Pitrou
37ffc3e3ba
Issue #8672 : Add a zlib test ensuring that an incomplete stream can be
...
handled by a decompressor object without errors (it returns incomplete
uncompressed data).
2010-05-11 23:32:31 +00:00
Michael Foord
72b1977221
Improving help message for python -m unittest. Issue 8303.
2010-05-10 20:21:16 +00:00
Giampaolo Rodolà
ff46d6e844
Issue #8490 : adds a more solid test suite for asyncore
2010-05-10 15:33:22 +00:00
Michael Foord
53a92eb3c3
Adding a test for unittest.BaseTestSuite.
2010-05-09 09:58:25 +00:00
Mark Dickinson
7000e9e01b
Issue #8644 : Improve accuracy of timedelta.total_seconds method.
...
(Backport of r80979 to py3k.) Thanks Alexander Belopolsky.
2010-05-09 09:30:06 +00:00
Gregory P. Smith
860852fdf4
Revert r81012. buildbot problems and its questionable of me to even
...
add this to trunk while we're on the way to 2.7rc1.
When fixed this can go into py3k first. Sorry.
2010-05-09 01:20:20 +00:00
Gregory P. Smith
56fe6569fd
Fixes [issue7245] Better Ctrl-C support in pdb.
2010-05-08 23:38:49 +00:00
Jean-Paul Calderone
e54ddf1ed2
Skip signal handler re-installation if it is not necessary. Issue 8354.
2010-05-08 20:06:02 +00:00
Benjamin Peterson
c251607d59
bump version to 2.7 beta 2
2010-05-08 17:08:17 +00:00
Michael Foord
9c164af6c3
unittest: issue 8301. Adding functions to test suites no longer crashes.
2010-05-08 17:06:25 +00:00
Benjamin Peterson
7daf0e4aa1
update pydoc-topics
2010-05-08 17:05:19 +00:00
Benjamin Peterson
f063d15873
run and fix enumerate start test cases #8636
2010-05-08 16:44:52 +00:00
Michael Foord
959c16d7a4
Updating documentation and adding docstrings to unittest.TestCase.assertRegexpMatches and assertNotRegexpMatches. Issue 8038.
2010-05-08 16:40:52 +00:00
Benjamin Peterson
7baf8627bd
add underscore
2010-05-08 15:42:29 +00:00
Benjamin Peterson
ac896ed177
r80967 introduced a new scheme
2010-05-08 15:41:44 +00:00
Antoine Pitrou
dac6aeb43c
Revert r80963 - it broke compilation everywhere
2010-05-08 15:23:57 +00:00
Michael Foord
22097e4e66
Issue 7780. Adding a test for unittest test discovery from a dotted path.
2010-05-08 13:20:07 +00:00
Ronald Oussoren
2f88bfdf96
Issue #8084 : ensure that the --user directory
...
conforms to platforms standars on OSX when
using a python framework.
2010-05-08 10:29:06 +00:00
Ronald Oussoren
d875d3c36e
Fix for issue #7724 : make it possible to build using
...
the OSX 10.4u SDK on MacOSX 10.6 by honoring the specified
SDK when looking for files.
2010-05-08 08:44:37 +00:00
Senthil Kumaran
18e4dd74e0
Fixing the errors trigerred in test_urllib2net. Related to issue8656.
2010-05-08 05:00:11 +00:00
Senthil Kumaran
6057ba1f97
Fix Issue8656 - urllib2 mangles file://-scheme URLs
2010-05-08 03:11:50 +00:00
Michael Foord
e6f5e22123
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
2010-05-07 23:39:38 +00:00
Benjamin Peterson
1a0ce685ab
revert r80932; it breaks windows
2010-05-07 20:45:07 +00:00
Benjamin Peterson
5dfad9dc9a
Merged revisions 79911,79916-79917,80018,80418,80572-80573,80635-80639,80668,80922 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79911 | benjamin.peterson | 2010-04-09 15:38:53 -0500 (Fri, 09 Apr 2010) | 1 line
use absolute import
........
r79916 | benjamin.peterson | 2010-04-09 16:05:21 -0500 (Fri, 09 Apr 2010) | 1 line
generalize detection of __future__ imports and attach them to the tree
........
r79917 | benjamin.peterson | 2010-04-09 16:11:44 -0500 (Fri, 09 Apr 2010) | 1 line
don't try to 'fix' relative imports when absolute_import is enabled #8858
........
r80018 | benjamin.peterson | 2010-04-12 16:12:12 -0500 (Mon, 12 Apr 2010) | 4 lines
prevent diffs from being mangled is multiprocess mode #6409
Patch by George Boutsioukis.
........
r80418 | benjamin.peterson | 2010-04-23 16:00:03 -0500 (Fri, 23 Apr 2010) | 1 line
remove unhelpful description
........
r80572 | benjamin.peterson | 2010-04-27 20:33:54 -0500 (Tue, 27 Apr 2010) | 1 line
use unicode literals
........
r80573 | jeffrey.yasskin | 2010-04-27 23:08:27 -0500 (Tue, 27 Apr 2010) | 6 lines
Don't transform imports that are already relative. 2to3 turned
from . import refactor
into
from .. import refactor
which broke the transformation of 2to3 itself.
........
r80635 | benjamin.peterson | 2010-04-29 16:02:23 -0500 (Thu, 29 Apr 2010) | 1 line
remove imports
........
r80636 | benjamin.peterson | 2010-04-29 16:02:41 -0500 (Thu, 29 Apr 2010) | 1 line
unicode literal
........
r80637 | benjamin.peterson | 2010-04-29 16:03:42 -0500 (Thu, 29 Apr 2010) | 1 line
must pass a string to Number
........
r80638 | benjamin.peterson | 2010-04-29 16:05:34 -0500 (Thu, 29 Apr 2010) | 1 line
unicode literals
........
r80639 | benjamin.peterson | 2010-04-29 16:06:09 -0500 (Thu, 29 Apr 2010) | 1 line
pass string to Number
........
r80668 | jeffrey.yasskin | 2010-04-30 18:02:47 -0500 (Fri, 30 Apr 2010) | 4 lines
Make 2to3 run under Python 2.5 so that the benchmark suite at
http://hg.python.org/benchmarks/ can use it and still run on implementations
that haven't gotten to 2.6 yet. Fixes issue 8566.
........
r80922 | benjamin.peterson | 2010-05-07 11:06:25 -0500 (Fri, 07 May 2010) | 1 line
prevent xrange transformation from wrapping range calls it produces in list
........
2010-05-07 18:58:23 +00:00
Michael Foord
ae4dde0858
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
2010-05-07 18:16:19 +00:00
Antoine Pitrou
3843cd8e86
Issue #8571 : Fix an internal error when compressing or decompressing a
...
chunk larger than 1GB with the zlib module's compressor and decompressor
objects.
2010-05-07 16:50:34 +00:00
Michael Foord
4fedbce55a
Adding tests for unittest command line handling of buffer, catchbreak and failfast.
2010-05-07 15:52:05 +00:00
Michael Foord
215d394b82
Adding a test for unittest test discovery with dotted path name.
2010-05-07 15:34:08 +00:00
Senthil Kumaran
e41bb0bc2c
Testsuite for RFC3986 based parsing scenario. Related Issue1462525.
2010-05-07 04:07:29 +00:00
Giampaolo Rodolà
e4499a88c2
adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong
2010-05-06 20:19:32 +00:00
Giampaolo Rodolà
215b6b392d
provides a clearer warning message when cheap inheritance with the underlying socket object is used
2010-05-06 19:56:34 +00:00
Giampaolo Rodolà
f7454fa98d
Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
2010-05-06 17:57:06 +00:00
Antoine Pitrou
1bbb68d37c
`self` doesn't exist here
2010-05-06 14:11:23 +00:00
Brian Curtin
11f8b9db79
Fix #7863 . Properly identify Windows 7 and Server 2008 R2.
...
Removed various unused code and added a way to correctly determine
server vs. workstation via the registry.
2010-05-06 02:54:44 +00:00
Mark Dickinson
481ab89b75
Issue #1533 : test_range in test_builtin: fix test comment and add test
...
for rejection of small floats. Thanks Alexander Belopolsky.
2010-05-05 22:42:51 +00:00
Tarek Ziadé
31a673da52
removed non needed lines
2010-05-05 22:41:25 +00:00
Tarek Ziadé
38f81223ae
Fixed #4265 : shutil.copyfile() was leaking file descriptors when disk fills
2010-05-05 22:15:31 +00:00
Ronald Oussoren
9545a23c7f
In a number of places code still revers
...
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).
Fixes issue #7908 for the trunk.
2010-05-05 19:09:31 +00:00
Antoine Pitrou
a8157183b8
Issue #8600 : fix test_gdb failures when gdb issues some spurious warnings.
2010-05-05 18:29:02 +00:00
R. David Murray
7d93221a5c
Issue #7472 : remove unused code from email.encoders.encode_7or8bit.
...
Yukihiro Nakadaira noticed a typo in encode_7or8bit that was trying
to special case iso-2022 codecs. It turns out that the code in
question is never used, because whereas it was designed to trigger
if the payload encoding was eight bit but its output encoding was
7 bit, in practice the payload is always converted to the 7bit
encoding before encode_7or8bit is called. Patch by Shawat Anand.
2010-05-05 17:31:03 +00:00
Barry Warsaw
43ad706ef4
Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
...
Debian unhappy. The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay. Guido likes woodpeckers.
2010-05-05 16:15:09 +00:00
Ronald Oussoren
91165c0b42
Force exit using os._exit instead of sys.exit,
...
this makes sure that the child does not continue
testing.
2010-05-05 15:32:39 +00:00
Ronald Oussoren
3320696371
The C function used by uuid.uuid4 is broken on
...
OSX 10.6 in that after os.fork() the parent and
child generate the same sequence of UUIDs.
This patch falls back to the the Python implementation
on OSX 10.6 or later.
Fixes issue #8621 .
2010-05-05 14:48:37 +00:00
Victor Stinner
926fd4ee32
Issue #8313 : traceback.format_exception_only() encodes unicode message to
...
ASCII with backslashreplace error handler if str(value) failed
2010-05-05 12:40:49 +00:00
Mark Dickinson
3b0b4ff19e
Fix test_gzip failure on OS X. The failure was a result of trying to fflush
...
a file that wasn't open for writing. Patch by Antoine Pitrou.
2010-05-04 18:45:27 +00:00
Thomas Heller
06a7e2069a
On Windows, ctypes does no longer check the stack before and after
...
calling a foreign function. This allows to use the unmodified libffi
library.
Remove most files from _ctypes/libffi_msvc, only two include files
stay (updated from _ctypes/libffi/...). Other files are used in the
cross-platform _ctypes/libffi directory.
2010-05-04 18:44:42 +00:00
Mark Dickinson
a8d2668818
Issue #1533 : fix inconsistency in range function argument processing:
...
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method. Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.
Patch by Alexander Belopolsky (with minor modifications).
2010-05-04 16:18:25 +00:00
Mark Dickinson
4f96f5ffc6
Issue #8567 : Fix incorrect precedence of signals in Decimal module.
...
When a Decimal operation raises multiple signals and more than one of
those signals is trapped, the specification determines the order in
which the signals should be handled. In many cases this order wasn't
being followed, leading to the wrong Python exception being raised.
This commit fixes those cases, and adds extra tests. The tests are
only enabled when EXTENDEDERRORTESTS is True, since they involve
rerunning each Decimal testcase several times.
2010-05-04 14:25:50 +00:00
Victor Stinner
7120219918
_pyio: Fix TextIOWrapper constructor: os has no device_encoding() function
...
_io module doesn't call this function which was introduced in Python3.
2010-05-04 11:35:36 +00:00
Alexandre Vassalotti
268e4872d3
Issue #8404 : Fix set operations on dictionary views.
2010-05-04 03:21:51 +00:00
Antoine Pitrou
f7fd8e4c94
Issue #7865 : The close() method of :mod:`io` objects should not swallow
...
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
2010-05-03 16:25:33 +00:00
Vinay Sajip
27a1370ae0
Issue #8576 : logging updated to remove usage of find_unused_port().
2010-05-03 15:11:53 +00:00
Michael Foord
f9ffccea56
Fix unittest tests to not abuse traceback.format_exception
2010-05-02 20:39:42 +00:00
Ronald Oussoren
b0153cf7ac
Small update to r80698 to ensure that webbrowser.open
...
uses the default browser.
2010-05-02 09:55:57 +00:00
Ronald Oussoren
4ef1c7e7ef
For for issue #7192 : with this patch webbrowser.get("firefox")
...
works on OSX
2010-05-02 09:48:21 +00:00
Antoine Pitrou
8651810df9
Remove duplicate test
2010-05-01 20:26:58 +00:00
Mark Dickinson
16cd2bea1d
Fix incorrect use of a list as the target of an 'except' clause in test_decimal.py.
2010-05-01 11:46:20 +00:00
Senthil Kumaran
1b7f9e53b3
Fix issue8582: urllib.urlretrieve fails with ValueError: Invalid format string
2010-05-01 08:01:56 +00:00
Antoine Pitrou
54f9f83e5c
Issue #8576 : Remove use of find_unused_port() in test_smtplib and
...
test_multiprocessing. Patch by Paul Moore.
2010-04-30 23:08:48 +00:00
Tarek Ziadé
a5cd18275e
Fixed #8577 . distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir
2010-04-30 12:15:12 +00:00
Andrew M. Kuchling
ba88b7f23b
Always add space after RFC; reword paragraph
2010-04-30 00:49:09 +00:00
Lars Gustäbel
5c4c4619b0
Issue #8464 : tarfile.open(name, mode="w|") no longer creates
...
files with execute permissions set.
2010-04-29 15:23:38 +00:00
Antoine Pitrou
3945c867d6
Fix style issues in test_ssl
2010-04-28 21:11:01 +00:00
Senthil Kumaran
ed9204346e
Fixed Issue6312 - httplib fails with HEAD requests to pages with "transfer-encoding: chunked"
2010-04-28 17:20:43 +00:00
Nick Coghlan
dfb45dfd04
Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro)
2010-04-28 14:29:06 +00:00
Victor Stinner
6a10281d33
Issue #7449 , last part (11): fix many tests if thread support is disabled
...
* Use try/except ImportError or test_support.import_module() to import thread
and threading modules
* Add @unittest.skipUnless(threading, ...) to testcases using threads
2010-04-27 23:55:59 +00:00
Victor Stinner
c73a05f775
Issue #7449 , part 10: test_cmd imports trace module using test_support.import_module()
...
Use test_support.import_module() instead of import to raise a SkipTest
exception if the import fail. Import trace fails if the threading module is
missing.
See also part 3: test_doctest: import trace module in test_coverage().
2010-04-27 23:51:16 +00:00
Victor Stinner
47c884129d
Partial revert of r80556 (Issue #7449 , part 5, fix ctypes test)
...
Rewrite r80556: the thread test have to be executed just after the test on
libc_open() and so the test cannot be splitted in two functions (without
duplicating code, and I don't want to duplicate code).
2010-04-27 23:33:58 +00:00
Victor Stinner
a44b5a3326
Issue #7449 , part 9: fix test_xmlrpclib for missing threading module
...
* Skip testcases using threads if threading module is missing
* Use "http://" instead of URL in ServerProxyTestCase if threading is missing
because URL is not set in this case
2010-04-27 23:14:58 +00:00
Victor Stinner
09227b9111
Issue #7449 , part 8: don't skip the whole test_asynchat if threading is missing
...
TestFifo can be executed without the threading module
2010-04-27 23:03:16 +00:00
Victor Stinner
be595d336c
Issue #7449 , part 7: simplify threading detection in test_capi
...
* Skip TestPendingCalls if threading module is missing
* Test if threading module is present or not, instead of test the presence of
_testcapi._test_thread_state
2010-04-27 23:01:29 +00:00
Victor Stinner
fd8ea99275
Issue #7449 , part 6: fix test_hashlib for missing threading module
...
Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
2010-04-27 22:59:35 +00:00
Antoine Pitrou
4c7bcf1194
Issue #8086 : In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline
...
before the certificate footer. Patch by Kyle VanderBeek.
2010-04-27 22:03:37 +00:00
Victor Stinner
9751472001
Issue #7449 , part 5: split Test.test_open() of ctypes/test/test_errno.py
...
* Split Test.test_open() in 2 functions: test_open() and test_thread_open()
* Skip test_open() and test_thread_open() if we are unable to find the C
library
* Skip test_thread_open() if thread support is disabled
* Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
2010-04-27 22:01:24 +00:00
Victor Stinner
613b4cf283
Issue #7449 , part 4: skip test_multiprocessing if thread support is disabled
...
import threading after _multiprocessing to raise a more revelant error message:
"No module named _multiprocessing". _multiprocessing is not compiled without
thread support.
2010-04-27 21:56:26 +00:00
Victor Stinner
edb9f873cf
Issue #7449 part 3, test_doctest: import trace module in test_coverage()
...
Import trace module fail if the threading module is missing. test_coverage() is
only used if test_doctest.py is used with the -c option. This commit allows to
execute the test suite without thread support.
Move "import trace" in test_coverage() and use
test_support.import_module('trace').
2010-04-27 21:51:26 +00:00
Victor Stinner
1b4a69d79b
Issue #7449 , part 2: regrtest.py -j option requires thread support
2010-04-27 21:47:01 +00:00
Victor Stinner
d9d147b806
Issue #7449 , part 1: fix test_support.py for Python compiled without thread
2010-04-27 21:46:03 +00:00
Benjamin Peterson
ae9f8bd2f9
correct signature
2010-04-27 21:19:06 +00:00
Benjamin Peterson
27737259b4
condense import
2010-04-27 21:18:30 +00:00
Benjamin Peterson
fed4abcc84
fold __future__ imports
2010-04-27 21:17:22 +00:00
Benjamin Peterson
5e9cc5efed
fix comment
2010-04-27 21:15:28 +00:00
Benjamin Peterson
a9bd6d5ea7
reject None as the buffering argument like the C implementation does #8546
2010-04-27 21:01:54 +00:00
Antoine Pitrou
9bf5425f5f
socket.error can really happen here, and fix a possible NameError
2010-04-27 13:13:26 +00:00
Antoine Pitrou
db187847fb
Qualify or remove or bare excepts. Simplify exception handling in places.
...
Remove uses of test_support.TestFailed.
2010-04-27 10:32:58 +00:00
Antoine Pitrou
435ba0cfb8
replace custom code with standard library functionality (HTTPServer.shutdown())
...
+ enable test that was never run (!)
+ make tests faster by lowering polling timeout
2010-04-27 09:51:18 +00:00
Antoine Pitrou
150acda57f
Remove uses of find_unused_port() in test_ssl, and small cleanups
2010-04-27 08:40:51 +00:00
R. David Murray
3939dcdb72
Issue #6656 : fix locale.format_string to handle escaped percents and mappings.
...
Refactors format_string. Includes tests for the two problems noted in
the issue, but as far as I can see there are no other tests that confirm
that format_string conforms to normal % formatting rules.
2010-04-26 21:17:14 +00:00
Antoine Pitrou
278d665c6a
When calling getpeername() in SSLSocket.__init__, only silence exceptions
...
caused by the "socket not connected" condition.
2010-04-26 17:23:33 +00:00
R. David Murray
3bfa883207
Issue 8325: Improve regrtest --help text.
2010-04-26 16:54:57 +00:00
Brett Cannon
3d6137962c
Revert an accidental commit from r80492.
2010-04-25 23:11:51 +00:00
Brett Cannon
1994969c15
When DeprecationWarning was silenced by default, it also silenced any use of -Q
...
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.
Fixes issue #7319 .
2010-04-25 22:33:36 +00:00
Antoine Pitrou
a624040d72
Issue #2302 : Fix a race condition in SocketServer.BaseServer.shutdown,
...
where the method could block indefinitely if called just before the
event loop started running. This also fixes the occasional freezes
witnessed in test_httpservers.
2010-04-25 21:40:32 +00:00
Antoine Pitrou
1ca8c19b65
Replace a Lock with a better suited Event.
2010-04-25 21:15:50 +00:00
Michael Foord
5c322ece96
Adding unittest.removeHandler function / decorator for removing the signal.SIGINT signal handler. With tests and docs.
2010-04-25 19:02:46 +00:00
Antoine Pitrou
fc69af1562
Issue #5103 : SSL handshake would ignore the socket timeout and block
...
indefinitely if the other end didn't respond.
2010-04-24 20:04:58 +00:00
Brian Curtin
a2936cfa09
Fix #7838 . Add docstrings and privatize _subprocess implementation details.
...
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
2010-04-24 15:40:11 +00:00
Antoine Pitrou
55841ac1a5
Make test_makefile_close a networked test (can't read() from a non-connected
...
socket under OS X), and skip it under Windows (where sockets can't be read()
from using their fds).
2010-04-24 10:43:57 +00:00
Georg Brandl
4341e54de8
#7507 : quote "!" in pipes.quote(); it is a special character for some shells.
2010-04-24 09:08:10 +00:00
Antoine Pitrou
b558f17b18
Issue #5238 : Calling makefile() on an SSL object would prevent the
...
underlying socket from being closed until all objects get truely destroyed.
2010-04-23 23:25:45 +00:00
Antoine Pitrou
dfb299bb95
Issue #7943 : Fix circular reference created when instantiating an SSL
...
socket. Initial patch by Péter Szabó.
2010-04-23 22:54:59 +00:00
Florent Xicluna
1273566cb7
Fix the "regrtest -s" switch.
2010-04-23 18:10:12 +00:00
Florent Xicluna
64f6c2fcab
Remove ImportWarnings filters. They become obsolete after r79310, issue #8205 .
2010-04-23 17:59:10 +00:00
Antoine Pitrou
a5c4b5515f
Issue #8108 : Fix the unwrap() method of SSL objects when the socket has
...
a non-infinite timeout. Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.
Issue #8108 : test_ftplib's non-blocking SSL server now has proper handling
of SSL shutdowns.
2010-04-22 23:33:02 +00:00
Antoine Pitrou
9aed604fb2
Skip test on old versions of OpenSSL
2010-04-22 18:00:41 +00:00
Antoine Pitrou
60b1ee375c
Temporarily display OpenSSL version in verbose run -- trying to diagnose failure on Neal's buildbot.
2010-04-22 17:44:41 +00:00
Senthil Kumaran
398246169c
Changed tests to only urlparse one, which was enough, addressed Ezio's comment
...
on Invalid url check statement and versionchanged string in docs.
2010-04-22 12:10:13 +00:00
Ezio Melotti
19c06739c5
Rephrase comment.
2010-04-22 11:53:21 +00:00
Ezio Melotti
23196a564b
#8474 : fix duplicate test in test_email.
2010-04-22 11:23:31 +00:00
Antoine Pitrou
1a9e9f282e
Forgot to add the sample certificate (followup to r80314)
2010-04-21 19:36:23 +00:00
Antoine Pitrou
c715a9ed08
Issue #8484 : Load all ciphers and digest algorithms when initializing
...
the _ssl extension, such that verification of some SSL certificates
doesn't fail because of an "unknown algorithm".
2010-04-21 19:28:03 +00:00
Tarek Ziadé
62e17ad234
shutil: removed unused import and fixed attributes names in _call_external_zip
2010-04-21 13:32:26 +00:00
Ronald Oussoren
78118992ad
Sync test_plistlib.py with plistlib.py
2010-04-21 06:00:35 +00:00
Victor Stinner
a92e81bf48
Issue #8437 : Fix test_gdb failures, patch written by Dave Malcolm
2010-04-20 22:28:31 +00:00
Tarek Ziadé
e593fad81b
removed ztar support in shutil.make_archive
2010-04-20 21:09:06 +00:00
Ronald Oussoren
8e6ca8fb19
Fix for issue 7852: the DTD for OSX Plists has changed due
...
to a change in the company name for Apple.
2010-04-20 20:59:37 +00:00
Senthil Kumaran
241a04371b
Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better.
2010-04-20 20:37:59 +00:00
Matthias Klose
c166b4021f
fix typo in r79533, introduced by the fix for issue #8233
2010-04-20 19:45:34 +00:00
Stefan Krah
68b4e01c48
1) The timeout in the itimer tests was too low for slow or heavily
...
loaded machines.
2) Even with the increased timeout, the OS does not guarantee that
a process will get a certain amount of virtual time in 60s, so
the failure is changed to a diagnostic.
2010-04-20 07:59:10 +00:00
Senthil Kumaran
281b551a2e
Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls.
2010-04-20 06:54:59 +00:00
Giampaolo Rodolà
607f7c056e
Fix Issue #4841 : timeout is now applied for connections resulting from PORT/EPRT commands
2010-04-19 21:46:28 +00:00
Tarek Ziadé
8a12f940fe
Fixed #8463 : added missing reference to bztar in shutil's documentation.
2010-04-19 21:28:21 +00:00
Tarek Ziadé
f1c28b75e0
few pep8 fixes
2010-04-19 21:13:03 +00:00
Antoine Pitrou
7c587bf53d
Issue #8438 : Remove reference to the missing "surrogateescape" encoding
...
error handler from the new IO library.
2010-04-19 18:52:43 +00:00
Raymond Hettinger
35b76027f9
Issue 8436: set.__init__ accepts keyword args
2010-04-18 22:57:57 +00:00
Antoine Pitrou
9958c56eb0
Fix catastrophic file opening and closing logic in test_linecache
2010-04-18 19:14:38 +00:00
Victor Stinner
814b6c222d
Revert r80166 (and r80171), restore Lib/platform.py. subprocess cannot be used in platform.py
2010-04-18 18:22:25 +00:00
Ronald Oussoren
37805e5c1f
Fix for issue #7072
2010-04-18 13:47:49 +00:00
Giampaolo Rodolà
cf445fced4
Fix Issue #3817 : 225 is now considered a valid response code for ABOR
2010-04-18 12:55:03 +00:00
Antoine Pitrou
5ac74168b9
Fix bootstrap after r80166
2010-04-18 11:16:24 +00:00
Victor Stinner
b2a0a434a8
platform: use subprocess.Popen() instead of os.popen() in _syscmd_file()
...
* Popen() avoids ugly shell escape: target.replace('"', '\\"')
* Use proc.communicate() instead of f.stdout.read()
* Get output from stdout by splitting with ": " instead of splitting by spaces
to support filename with spaces
2010-04-18 09:07:49 +00:00
Martin v. Löwis
24f09fdb23
Issue #8279 : Fix test_gdb failures.
2010-04-17 22:40:40 +00:00
R. David Murray
fb4812fb59
Issue #8263 : On freebsd6 the unittest 'break' test stops regrtest; skip it.
...
This is presumably related to issue 3864, and appears to be due
to a platform bug on freebsd6.
2010-04-17 21:59:26 +00:00
Antoine Pitrou
0a6373c1a9
Issue #8322 : Add a *ciphers* argument to SSL sockets, so as to change the
...
available cipher list. Helps fix test_ssl with OpenSSL 1.0.0.
2010-04-17 17:10:38 +00:00
Senthil Kumaran
420ec8a0cd
Fix Issue5650 - Update the RFC List in the urlparse module.
2010-04-17 14:30:53 +00:00
R. David Murray
e0e8a87d7e
Issue #3864 : Skip three test_signal tests on freebsd6 due to platform bug.
...
Two itimer tests and an interprocess signal test fail on FreeBSD 6 if
any test that starts a thread runs before test_signal. Since FreeBSD7
does not show this behavior, the bug is most likely a platform bug,
so this patch just skips the failing tests on freebsd6.
2010-04-17 05:26:26 +00:00
Benjamin Peterson
821a8ea39f
have a clear error when passing something > sys.maxsize to bytearray
2010-04-16 22:35:38 +00:00
Benjamin Peterson
5c4e292c14
fix typo
2010-04-16 22:25:57 +00:00
Benjamin Peterson
06f06a0b2f
bytearray -> type2test
2010-04-16 22:24:16 +00:00
Benjamin Peterson
e7ebdc2a61
remove check for unicode
2010-04-16 21:55:10 +00:00
Senthil Kumaran
8c6d9d7c8d
Fix issue2987: RFC2732 support for urlparse (IPv6 addresses)
2010-04-16 02:46:46 +00:00
Brian Curtin
b3dde13413
Fix os.kill tests to be more robust and work with slower machines.
...
Rather than depending on some sleep value, start up an interpreter
as a subprocess and communicate with it. Because subprocess pipes
can't be read from until EOF and I want to read from them before that,
use ctypes to peek by using PeekNamedPipe. Once the subprocess has
written the message, then it is ready to roll and accept signals.
After that, kill it.
2010-04-15 00:40:40 +00:00
Georg Brandl
ea56710cda
#5341 : fix typo and adapt docstring syntax.
2010-04-14 08:56:01 +00:00
Brian Curtin
235350a142
Add a small sleep to let a subprocess start before terminating it.
...
David Bolen's buildbot isn't know for it's speed, and it seems that we
may have been trying to kill the subprocess before it was fully
initialized. I ran with this change on the bot itself and it seemed to work.
2010-04-14 02:24:24 +00:00
R. David Murray
661303f27e
Issue #5277 : Fix quote counting when parsing RFC 2231 encoded parameters.
2010-04-13 20:57:40 +00:00
Mark Dickinson
2c4798b1fd
In test_winsound, don't try to import _winreg until after checking that winsound is supported.
2010-04-13 11:37:23 +00:00
Brian Curtin
d5c50b32aa
Fix #7306 . Add skips to test_winsound when no default sound is configured.
...
These failures occur on a Windows Server 2003 machine I test on.
2010-04-13 02:25:20 +00:00
Brian Curtin
bc96f3272d
Fix #8364 . Update the setquit docstring and change a built-in to builtin.
2010-04-12 23:30:49 +00:00
R. David Murray
1a14d3d169
Issue #7585 : use tab between components in unified and context diff headers.
...
Instead of spaces between the filename and date (or whatever the string
is that follows the filename, if any) use tabs. This is what the unix
'diff' command does, for example, and difflib was intended to follow
the 'standard' way of doing diffs. This improves compatibility with
patch tools. The docs and examples are also changed to recommended that
the date format used be the ISO 8601 format, which is what modern diff
tools emit by default.
Patch by Anatoly Techtonik.
2010-04-12 16:35:19 +00:00
Stefan Krah
9aca91d7d7
Issue #8367 : Fix spurious test failure on systems without a sound card.
2010-04-12 15:21:25 +00:00
R. David Murray
27ef93797c
Issue #7472 : ISO-2022 charsets now consistently use 7bit CTE.
...
Fixed a typo in the email.encoders module so that messages output using
an ISO-2022 character set will use a content-transfer-encoding of
7bit consistently. Previously if the input data had any eight bit
characters the output data would get marked as 8bit even though it
was actually 7bit.
2010-04-12 14:26:06 +00:00
Senthil Kumaran
d10b65eb68
Adding additional examples of valid urls as per RFC 3986 (for issue8339)
2010-04-12 06:50:24 +00:00
Martin v. Löwis
5a96543b36
Re-enable all tests, to see which ones fail on the buildbots.
2010-04-12 05:22:25 +00:00
Martin v. Löwis
7f7765ce39
Issue #8330 : Fix expected output in test_gdb.
2010-04-12 05:18:16 +00:00
Antoine Pitrou
fc53153498
Issue #8374 : Update the internal alias table in the :mod:`locale` module
...
to cover recent locale changes and additions.
2010-04-11 22:32:39 +00:00
Raymond Hettinger
fdf1b5642b
Minor factoring
2010-04-11 20:39:28 +00:00
Stefan Krah
a185839862
Fix for issues #3581 , #1481 and #7650 :
...
1. The assumptions in check_node() were too restrictive:
- Hardware addresses with universal_local_bit=1 are valid
(locally administered).
- Many of the tested functions (including uuid.getnode())
may return valid RFC 4122 random node IDs. These are pretty
much random 48-bit values with the multicast bit set to 1.
2. _unixdll_getnode() calls _uuid_generate_time(), which may be None
on some platforms. The resulting TypeError is now caught.
2010-04-11 15:15:54 +00:00
Benjamin Peterson
a11da59755
add test for class with no operations defined
2010-04-11 01:40:32 +00:00
Antoine Pitrou
bba8f2d10a
Revert temporary commit in r79937
2010-04-10 23:32:12 +00:00
Antoine Pitrou
16e026cc94
Temporary commit of fix to issue #5380 (in order to watch buildbot response)
2010-04-10 22:43:05 +00:00
Philip Jenvey
cdd98fb463
fix PYTHONWARNINGS handling to not modify the original env value and improve
...
its tests
2010-04-10 20:27:15 +00:00
Jean-Paul Calderone
b60ee469cd
Refactor a couple inspect module tests to remove duplicate code
...
The test_classify_oldstyle and test_classify_newstyle methods of
test.test_inspect.TestClassesAndFunctions were previously almost
identical (aside from irrelevant whitespace and one semantic
difference). They now share a single helper.
Fixes issue #8363 .
2010-04-10 19:59:28 +00:00
Philip Jenvey
bb66973afb
adjust gc_collect for Jython
2010-04-10 19:39:07 +00:00
Raymond Hettinger
4e45512de2
Issue 8361: Remove assert from functools.total_ordering
2010-04-10 16:57:36 +00:00
Benjamin Peterson
2cab8db95e
update pydoc-topics
2010-04-10 16:28:34 +00:00
Benjamin Peterson
fbac6c1590
bump version to 2.7b1
2010-04-10 16:22:05 +00:00
Nick Coghlan
14459d5b1b
Fix typo in comment
2010-04-10 15:01:54 +00:00
Nick Coghlan
13623662ea
Try to turn some buildbots green by allowing test_multiprocessing to pass even if it hits the sys.exc_clear code in the threading module, and improve the test coverage by making the ctypes dependencies a bit more granular (two of the cited ctypes objects don't exist on my system)
2010-04-10 14:24:36 +00:00
Antoine Pitrou
343314a11c
Revert r79915 (temporary commit to check for buildbots -> the fix was successful)
2010-04-09 22:41:31 +00:00
Antoine Pitrou
9c6cd56e91
Temporarily commit fix to issue #8108 , to check for buildbot response
2010-04-09 21:00:36 +00:00
Martin v. Löwis
7bc26b9be6
Issue #8348 : Fix test ftp url in test_urllib2net.
2010-04-08 17:40:54 +00:00
Martin v. Löwis
e84089e3f1
Issue #8204 : Fix test_ttk notebook test by forcing focus.
2010-04-08 17:38:32 +00:00
Martin v. Löwis
1b287c7434
Issue #8344 : Fix test_ttk bug on FreeBSD.
2010-04-08 09:47:40 +00:00
Michael Foord
91a2c89288
Switch regrtest to use StringIO instead of cStringIO for test_multiprocessing on Windows. Issue 8333.
2010-04-08 00:04:24 +00:00
Michael Foord
f6ff26c486
unittest.result.TestResult does not create its buffers until they're used. It uses StringIO not cStringIO. Issue 8333.
2010-04-07 23:04:22 +00:00
Martin v. Löwis
9a39eccfe1
Issue #8337 : Disable the remaining test also for now.
2010-04-07 19:11:32 +00:00
Mark Dickinson
65605f7a5f
Use some more interesting test values for (unsigned) long long ctypes tests,
...
in the hope of getting more information about the test_ctypes failures
on Sparc (see issue #8314 ).
2010-04-07 10:18:27 +00:00
Philip Jenvey
aebbaeb962
#7301 : add the environment variable $PYTHONWARNINGS to supplement the -W
...
command line option
patch from Brian Curtin
2010-04-06 23:24:45 +00:00
Michael Foord
c1bf677e28
Fix module directory finding logic for dotted paths in unittest test discovery.
2010-04-06 23:18:16 +00:00
Benjamin Peterson
3a1dfa21c2
remove a optimization that resulted in unexpected behavior #8929
2010-04-06 21:50:00 +00:00
Benjamin Peterson
22c62dd345
use skip decorator
2010-04-06 21:37:06 +00:00
Antoine Pitrou
3b4c989cfd
Issue #8193 : Fix test_zlib failure with zlib 1.2.4.
2010-04-06 17:21:09 +00:00
Senthil Kumaran
b02b311592
Fix Issue8262 - changing RuntimeError wording to "Threads can only be started once"
2010-04-06 03:23:33 +00:00
Antoine Pitrou
f9de534c21
Issue #8321 : Give access to OpenSSL version numbers from the `ssl` module,
...
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO`
and `ssl.OPENSSL_VERSION_NUMBER`.
2010-04-05 21:35:07 +00:00
Brian Curtin
fce1d31d47
Fix a failing test on an apparently slow Windows buildbot.
...
On slower Windows machines, waiting 0.1 seconds can sometimes not be
enough for a subprocess to start and be ready to accept signals, causing
the test to fail. One buildbot is also choking on input()/EOFError so
that was changed to not depend on input.
2010-04-05 19:04:23 +00:00
Raymond Hettinger
e1d665a90e
Classes that override __eq__ also need to define __hash__.
2010-04-05 18:53:43 +00:00
Mark Dickinson
5e0c2748fb
Use a more robust infinity check in _Py_HashDouble.
...
This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently
doesn't follow C99 Annex F on FreeBSD.)
2010-04-05 18:07:51 +00:00
R. David Murray
0c08009708
Issue 8316: make test_gdb robust in the face of differing terminal
...
widths. Patch by Dave Malcolm.
2010-04-05 16:28:49 +00:00
Philip Jenvey
034b0acdd3
fix escape_encode to return the correct consumed size
2010-04-05 02:51:51 +00:00
Benjamin Peterson
76a23c17bc
fix dis on new style classes #8310
2010-04-04 23:23:22 +00:00
Raymond Hettinger
06bc0b6d2e
Add tests for functools.total_ordering.
2010-04-04 22:24:03 +00:00
Raymond Hettinger
bb006cf26c
Add tests for cmp_to_key.
...
Adopt PEP 8 compliant function name.
Factor-out existing uses cmp_to_key.
Update documentation to use internal pointers instead of external resource.
2010-04-04 21:45:01 +00:00
Raymond Hettinger
a551f31d48
Add functools.CmpToKey()
2010-04-04 18:34:45 +00:00
Mark Dickinson
fdaaa9c9d8
Issue #8300 (__index__ handling in struct.pack): Remove redundant check
...
and improve test coverage. Thanks Meador Inge for the patch.
2010-04-04 08:43:04 +00:00
Ezio Melotti
a28eb1c429
Use more specific assert* methods in test_struct.
2010-04-04 07:00:02 +00:00
Raymond Hettinger
ab8b9cae7e
Expand test coverage for deque.count().
2010-04-03 22:34:15 +00:00
Benjamin Peterson
a44f393c93
import bsddb more robustly
2010-04-03 21:50:40 +00:00
Antoine Pitrou
47b1d02d85
Remove useless (?) import from r79706
2010-04-03 21:42:18 +00:00
Mark Dickinson
a3a505076e
Silence DeprecationWarnings from uses of has_key and <> in plat-mac.
2010-04-03 18:17:54 +00:00
Raymond Hettinger
5f516edd77
Add count() method to collections.deque().
2010-04-03 18:10:37 +00:00
Mark Dickinson
74c5c2b2a1
Replace backquotes with repr(), to silence a SyntaxWarning.
2010-04-03 16:54:02 +00:00
Mark Dickinson
920fd66ac6
Ensure 'module removed' warning messages contain the word 'module' or 'package'.
...
This should fix the test_py3kwarn failure on OS X. test_support.import_module
also requires this.
2010-04-03 16:41:20 +00:00
Benjamin Peterson
0ccc7bbb34
stop CObject deprecation warnings in test___all__
2010-04-03 16:06:42 +00:00
Benjamin Peterson
674a9eb6e3
remove deprecation warnings silence attempting
2010-04-03 15:58:15 +00:00
Benjamin Peterson
4dbda8593d
spelling
2010-04-03 15:45:59 +00:00
Benjamin Peterson
7beeeb5713
silence PyCObject warnings in bsddb
2010-04-03 15:44:56 +00:00
Benjamin Peterson
7daf985feb
remove unneeded argument
2010-04-03 15:40:29 +00:00
Benjamin Peterson
73541af85d
wrap
2010-04-03 15:38:38 +00:00
Michael Foord
3dd9f40d6d
Minor tweak to unittest command line usage message
2010-04-03 15:20:00 +00:00
Michael Foord
d43b63fed3
Adding -b command line option to the unittest usage message.
2010-04-03 14:52:18 +00:00
Ezio Melotti
856a3be76a
Use more specific assert* methods in test_decimal.
2010-04-03 14:51:00 +00:00
Mark Dickinson
4846a8e828
Issue #8300 : Let struct.pack use __index__ to convert and pack non-integers.
...
Based on a patch by Meador Inge.
2010-04-03 14:05:10 +00:00
Mark Dickinson
b05dc00fb7
Fix a couple of issues with the test_structmembersType class in _testcapimodule
...
- rename to _test_structmembersType to avoid the class being automatically
called by test_capi
- allow space for trailing NUL in inplace_member field of all_structmembers
- use T_STRING_INPLACE instead of T_INPLACE_STRING as keyword argument
to _test_structmembersType initializer
- don't attempt to initialize inplace_member field if T_STRING_INPLACE
argument wasn't supplied.
2010-04-03 10:27:05 +00:00
Raymond Hettinger
34c35b2788
Add subtract() method to collections.Counter() objects.
2010-04-03 10:22:00 +00:00
Raymond Hettinger
dd2fedcd1c
Factor-out constant expressions
2010-04-03 07:57:09 +00:00
Raymond Hettinger
6b96ecb0ab
Improve clear() method. Keeps key/value refcnts >= 1 until final dict.clear() so that decrefs to zero won't trigger arbitrary code . Also runs a bit faster.
2010-04-03 03:14:28 +00:00
Michael Foord
93232660bb
Another attempt at a fix for unittest.test.test_result for windows line endings
2010-04-03 02:33:55 +00:00
Michael Foord
9b4ee12e89
Cross platform unittest.TestResult newline handling when buffering stdout / stderr.
2010-04-03 02:21:39 +00:00
Benjamin Peterson
1c7c11ef61
give TypeError when trying to set T_STRING_INPLACE
2010-04-03 01:28:57 +00:00
Michael Foord
931190b4f5
Support dotted module names for test discovery paths in unittest. Issue 7780.
2010-04-03 01:15:21 +00:00
Benjamin Peterson
2b79fdfc69
split out large test function
2010-04-03 01:08:34 +00:00
Brian Curtin
e9da81c62b
Fix assertRaises usage on reflection functions which should raise
...
NotImplementedError on Windows XP and below.
2010-04-03 00:59:32 +00:00
Raymond Hettinger
3928276e64
Clear cyclical references in list based OrderedDict.
2010-04-03 00:39:26 +00:00
Benjamin Peterson
4564c08b26
set svn:eol-style on new file
2010-04-02 23:31:40 +00:00
Brian Curtin
e5aa886b44
Implement #1220212 . Add os.kill support for Windows.
...
os.kill takes one of two newly added signals, CTRL_C_EVENT and
CTRL_BREAK_EVENT, or any integer value. The events are a special case
which work with subprocess console applications which implement a
special console control handler. Any other value but those two will
cause os.kill to use TerminateProcess, outright killing the process.
This change adds win_console_handler.py, which is a script to implement
SetConsoleCtrlHandler and applicable handler function, using ctypes.
subprocess also gets another attribute which is a necessary flag to
creationflags in Popen in order to send the CTRL events.
2010-04-02 23:26:06 +00:00
Michael Foord
a04c7a0f16
Issue #8038 : Addition of unittest.TestCase.assertNotRegexpMatches
2010-04-02 22:55:59 +00:00
Michael Foord
25d7976014
unittest tests no longer replace the sys.stdout put in place by regrtest
2010-04-02 22:30:56 +00:00
Mark Dickinson
7c63eee485
Issue #8294 : Allow float and Decimal arguments in Fraction constructor.
2010-04-02 22:27:36 +00:00
Michael Foord
58c1e78806
TestResult stores original sys.stdout and tests no longer use sys.__stdout__ (etc) in tests for unittest -b command line option
2010-04-02 22:08:29 +00:00
Ezio Melotti
7999deafc8
Fix test_compiler.py that was using unittest.__file__ to find Lib/ (unittest is now a package).
2010-04-02 21:43:10 +00:00
Michael Foord
5637f04a94
Addition of -b command line option to unittest for buffering stdout and stderr during test runs.
2010-04-02 21:42:47 +00:00
Brian Curtin
e33fa887d3
Implement #7347 . Add CreateKeyEx, DeleteKeyEx, and update _winreg tests.
...
*ReflectionKey functions used to not be documented or tested, but they are
now sufficiently documented and tested on platforms where they apply.
Additionally, fixed a bug in QueryReflectionKey which was returning an
incorrect value.
All tests pass from XP through Windows 7, on 32 and 64-bit platforms.
2010-04-02 21:18:14 +00:00
Tarek Ziadé
ef253ac84e
removed the local copy of xxmodule, and skip only test_build_ext when xxmodule is not found, not the whole unittest
2010-04-02 21:14:04 +00:00
Raymond Hettinger
ed171abd93
Issue 8257: Decimal constructor to accept float.
2010-04-02 18:39:24 +00:00
Florent Xicluna
f37592fda1
Backport some robotparser test and skip the test if the external resource is not available.
2010-04-02 17:26:42 +00:00
Andrew M. Kuchling
d54e699cba
#4440 : modernize a use of filter(), making it compatible with 3.x
2010-04-02 16:59:16 +00:00
Eric Smith
d44b2fc87c
Issue 7994: Make object.__format__ with a non-empty format string a PendingDecprecationWarning. Still need to remove uses of this from various tests.
2010-04-02 12:30:56 +00:00
Mark Dickinson
f3eeca16cb
Issue #7279 : Make Decimal('nan') hashable. Decimal('snan') remains unhashable.
...
Also rewrite the Decimal __hash__ method so that it doesn't rely on
float('inf') being valid: float('inf') could raise an exception on
platforms not using IEEE 754 arithmetic.
2010-04-02 10:35:12 +00:00
Mark Dickinson
e096e82e82
Issue #7279 : Make comparisons involving a Decimal sNaN signal InvalidOperation.
2010-04-02 10:17:07 +00:00
Mark Dickinson
99d8096c17
Issue #2531 : Make float-to-decimal comparisons return correct results.
...
Float to decimal comparison operations now return a result based on
the numeric values of the operands. Decimal.__hash__ has also been
fixed so that Decimal and float values that compare equal have equal
hash value.
2010-04-02 08:53:22 +00:00
Florent Xicluna
dfd3618422
#7092 : silence some py3k warnings
2010-04-02 08:30:21 +00:00
Florent Xicluna
a7f242fa2a
#7092 : Drop the cmp argument.
2010-04-02 08:15:26 +00:00
Florent Xicluna
d630c04ab1
#7092 : Fix additional "-3" warnings in the idlelib package, and convert to absolute imports.
2010-04-02 07:24:52 +00:00
Florent Xicluna
8d1da0f5c3
#7092 : Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote.
2010-04-01 18:17:09 +00:00
Antoine Pitrou
b5023df3d6
Issue #8281 : rename test_gdb_sample.py to gdb_sample.py, otherwise it gets picked
...
as a regular test by regrtest.py, and fails.
2010-04-01 17:56:57 +00:00
Martin v. Löwis
bf0dfb3d0e
Issue #8032 : For gdb7, a python-gdb.py file is added to the build,
...
allowing to use advanced gdb features when debugging Python.
2010-04-01 07:40:51 +00:00
Brian Curtin
a01da93d85
Fix a test_pydoc failure on Neal Norwitz's buildbot.
2010-04-01 04:02:00 +00:00
Florent Xicluna
6257a7bbb2
Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
2010-03-31 22:01:03 +00:00
Antoine Pitrou
a57df2cf1d
Issue #8268 : Old-style classes (not just instances) now support weak
...
references.
2010-03-31 21:32:15 +00:00
Florent Xicluna
26cc99da2a
Fix test for xml.etree when using a non-ascii path. And use check_warnings instead of catch_warnings.
2010-03-31 21:21:54 +00:00
Barry Warsaw
f7f2d6f51e
- Issue #8233 : When run as a script, py_compile.py optionally takes a single
...
argument `-` which tells it to read files to compile from stdin. Each line
is read on demand and the named file is compiled immediately. (Original
patch by Piotr Ożarowski).
2010-03-31 21:07:16 +00:00
Brian Curtin
fe4900c0bc
Correct what was intended to be a single-tuple to just be a != check.
...
Thanks to Éric Araujo for noticing that.
2010-03-31 17:36:09 +00:00
Ezio Melotti
fcc500ebc4
Silence a py3k warning.
2010-03-31 08:33:50 +00:00
Brian Curtin
aeb2e8295d
Fix #8225 . xml.etree was displaying an incorrect link when viewed in help.
2010-03-31 03:10:21 +00:00
Thomas Heller
b102ddadcb
Revert rev. 79509; ctypes doesn't build on linux.
2010-03-30 20:57:06 +00:00
Thomas Heller
5006ba0fef
Merged revisions 79115,79424,79491 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/branch_libffi-3_0_10-win
........
r79115 | thomas.heller | 2010-03-19 22:14:47 +0100 (Fr, 19 Mrz 2010) | 7 lines
Work in progress. 2 tests fail on x86/win32 because the stack
checking code in ffi_call_win32 is not yet implemented.
Remove most files from _ctypes/libffi_msvc, only two include files
stay (updated from _ctypes/libffi/...). Other files are used in the
cross-platform _ctypes/libffi directory.
........
r79424 | thomas.heller | 2010-03-25 19:28:02 +0100 (Do, 25 Mrz 2010) | 1 line
Build _ctypes on Win64.
........
r79491 | thomas.heller | 2010-03-29 21:30:33 +0200 (Mo, 29 Mrz 2010) | 4 lines
On Windows, ctypes does no longer check the stack before and after
calling a foreign function.
This allows to use the unmodified libffi library.
........
2010-03-30 19:46:23 +00:00
Antoine Pitrou
8f66efe253
Fix small error in r79502
2010-03-30 18:58:22 +00:00
Antoine Pitrou
6032c25063
Issue #8248 : Add some tests for the bool type. Patch by Gregory Nofi.
2010-03-30 18:49:45 +00:00
Benjamin Peterson
7e213255ce
add inspect.getcallargs, which binds function arguments like a normal call #3135
...
Patch by George Sakkis
2010-03-30 17:58:13 +00:00
Florent Xicluna
75c6676916
#8263 : Now regrtest.py will report a failure if it receives a KeyboardInterrupt (SIGINT).
2010-03-30 16:31:14 +00:00
Florent Xicluna
22b243809e
#7643 : Unicode codepoints VT (0x0B) and FF (0x0C) are linebreaks according to Unicode Standard Annex #14 .
2010-03-30 08:24:06 +00:00
Michael Foord
e6410c536c
Backport of weakref.WeakSet and tests from Python 3.
2010-03-29 20:04:23 +00:00
Michael Foord
a7e08fe3f8
Addition of delta keyword argument to unittest.TestCase.assertAlmostEquals and assertNotAlmostEquals
...
This allows the comparison of objects by specifying a maximum difference; this includes the comparing of non-numeric objects that don't support rounding.
2010-03-27 19:10:11 +00:00
Michael Foord
b35ecf4775
Rename the unittest test_suite function to not clash with a test module name (unittest.test.test_suite is now unambiguous).
2010-03-27 13:42:34 +00:00
Michael Foord
ff889396a8
A fix for running unittest tests on platforms without the audioop module (e.g. jython and IronPython)
2010-03-27 12:55:19 +00:00
Mark Dickinson
71b7fac07b
Make Fraction to complex comparisons with <=, <, >= or > raise TypeError.
2010-03-27 11:09:29 +00:00
Florent Xicluna
355adc5a45
Ensure that the failed or unexpected tests are sorted before printing.
2010-03-26 19:32:44 +00:00
Benjamin Peterson
c7024e7fd6
reorder imports
2010-03-26 13:53:32 +00:00
Michael Foord
fa2f1cdcbb
Addition of -c command line option to unittest, to handle ctrl-c during a test run more elegantly
2010-03-26 03:18:31 +00:00
Michael Foord
ee627883a7
Move a support TestCase out of the main namespace in unittest.test.test_suite
2010-03-26 02:53:56 +00:00
Michael Foord
95ac82bfc6
Remove incorrect docstring in unittest.test
2010-03-26 00:03:38 +00:00
Michael Foord
35b3792ed3
Turn unittest tests into a package
2010-03-25 23:56:33 +00:00
Florent Xicluna
fd37dd46e8
Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
2010-03-25 20:39:10 +00:00
Florent Xicluna
8aa5a581d3
#8207 : Fix test_pep277 on OS X
2010-03-25 20:33:49 +00:00
Florent Xicluna
c8a730bf72
Syntax cleanup `== None` -> `is None`
2010-03-25 20:32:07 +00:00
Larry Hastings
402b73fb8d
Backported PyCapsule from 3.1, and converted most uses of
...
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Steven Bethard
2ec1f27716
Replace license with simple attribution.
2010-03-24 23:03:24 +00:00
Antoine Pitrou
2c6799ab8c
Revert r79384 (the fix failed).
2010-03-24 22:12:15 +00:00
Benjamin Peterson
fb224e3034
replace copy right notice with simple attribution
2010-03-24 22:03:09 +00:00
Antoine Pitrou
914bdbb495
Trying to fix #8108 . Will watch the buildbot(s).
2010-03-24 21:55:12 +00:00
Florent Xicluna
36b9fbb803
Skip tests which depend on multiprocessing.sharedctypes, if _ctypes is not available.
2010-03-24 19:33:25 +00:00
Florent Xicluna
27e024023c
Skip test_ascii_formatd if _ctypes is not available (BSD, ...).
...
Previous change was incomplete (r79334).
2010-03-24 17:32:58 +00:00
Vinay Sajip
b0623d64a8
logging: Added LOG_FTP for SysLogHandler and updated documentation.
2010-03-24 14:31:21 +00:00
Florent Xicluna
3c919cf140
The SIGINT signal may happen earlier, during site.py initialization.
2010-03-23 19:19:16 +00:00
Florent Xicluna
446ff14827
The standard error should be empty when the signal is killed, except on SIGINT.
2010-03-23 15:05:30 +00:00
Florent Xicluna
fc4d6d7763
Silence test_subprocess.
2010-03-23 14:36:45 +00:00
Florent Xicluna
875bdf731c
Skip test_format_deprecation if _ctypes is not available. Add a filter to the warning check.
2010-03-23 11:07:54 +00:00
Benjamin Peterson
996e88a7d5
Merged revisions 79313,79324 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79313 | benjamin.peterson | 2010-03-22 17:59:57 -0500 (Mon, 22 Mar 2010) | 1 line
another case where a symbol is needed
........
r79324 | benjamin.peterson | 2010-03-22 21:59:47 -0500 (Mon, 22 Mar 2010) | 1 line
use unicode literals
........
2010-03-23 03:03:55 +00:00
Benjamin Peterson
3bcc35b795
Merged revisions 79309 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79309 | benjamin.peterson | 2010-03-22 17:50:47 -0500 (Mon, 22 Mar 2010) | 1 line
pass correct symbol in
........
2010-03-22 22:54:42 +00:00
Florent Xicluna
176cda11df
Issue #8205 : Remove the "Modules" directory from sys.path when Python is running from the build directory (POSIX only).
2010-03-22 22:52:11 +00:00
Florent Xicluna
e1f4c92d23
#7667 : Fix doctest failures with non-ASCII paths.
2010-03-22 22:45:50 +00:00
Benjamin Peterson
798e54004f
Merged revisions 79077,79137,79304-79305 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r79077 | benjamin.peterson | 2010-03-18 18:05:29 -0500 (Thu, 18 Mar 2010) | 1 line
port detect_encoding improvements from py3k
........
r79137 | benjamin.peterson | 2010-03-20 11:12:53 -0500 (Sat, 20 Mar 2010) | 1 line
add a fixer for setting sys.exitfunc #2356
........
r79304 | benjamin.peterson | 2010-03-22 17:20:22 -0500 (Mon, 22 Mar 2010) | 1 line
fix test_parser when it's run in a path with spaces #7666
........
r79305 | benjamin.peterson | 2010-03-22 17:27:07 -0500 (Mon, 22 Mar 2010) | 1 line
normalize whitespace
........
2010-03-22 22:40:06 +00:00
Antoine Pitrou
513d9aeadb
Issue #7512 : shutil.copystat() could raise an OSError when the filesystem
...
didn't support chflags() (for example ZFS under FreeBSD). The error is
now silenced.
2010-03-22 19:59:46 +00:00
Florent Xicluna
0805e6eed9
#7668 : Fix test_httpservers failure when sys.executable contains non-ASCII bytes.
2010-03-22 17:18:18 +00:00
Florent Xicluna
9e7a4c9738
Issue #7703 : ctypes supports both buffer() and memoryview(). The former is deprecated.
...
Complement of r79288.
2010-03-22 16:07:38 +00:00
R. David Murray
c9d1a7845b
Issue #7860 : platform.uname now reports the correct 'machine' type
...
when Python is running in WOW64 mode on 64 bit Windows. Patch by
Brian Curtin.
2010-03-22 15:55:09 +00:00
Vinay Sajip
804899b4ab
logging: Added getChild utility method to Logger and added isEnabledFor method to LoggerAdapter.
2010-03-22 15:29:01 +00:00
Jesus Cea
73c22e9df2
Missing testsuite files
2010-03-22 15:18:46 +00:00
Florent Xicluna
f08a0176a7
Get rid of buffer() in test_ctypes: backport the 3.x tests.
2010-03-22 15:02:46 +00:00
Antoine Pitrou
52093b8e57
Fix an occasional test_ftplib failure, following r79226.
2010-03-22 14:41:48 +00:00
Jesus Cea
6557aac599
pybsddb 4.8.4 integration. Please, comment in issue #8156
2010-03-22 14:22:26 +00:00
Vinay Sajip
31e928eb3c
Issue #8201 : logging: Handle config errors when non-ASCII and Unicode logger names exist at the same time.
2010-03-22 13:02:28 +00:00
Victor Stinner
c7790ed163
Fix the NEWS about my last commit: an unicode subclass can now override the
...
__unicode__ method (and not the __str__ method).
Simplify also the testcase.
2010-03-22 12:36:28 +00:00
Vinay Sajip
3017a7bbbf
Issue #8200 : logging: Handle errors when multiprocessing is not fully loaded when logging occurs.
2010-03-22 12:33:08 +00:00
Victor Stinner
95affc4449
Issue #1583863 : An unicode subclass can now override the __str__ method
2010-03-22 12:24:37 +00:00
Michael Foord
eef159bd17
Correct usage message displayed for python -m unittest -h
2010-03-22 02:49:08 +00:00
Michael Foord
0ce167277a
expected failure should not trigger failfast behavior in unittest.
2010-03-22 01:56:54 +00:00
Michael Foord
49899690a8
Removing Python 2.3 compatibility code from unittest.
2010-03-22 01:41:11 +00:00
Michael Foord
db003cb3d1
Fix failing test committed by accident.
2010-03-22 01:02:23 +00:00
Michael Foord
1b9e95339d
-f/--failfast command line option for unittest. Issue 8074. Documentation still needed. Plus minor change to test_unittest to allow it to be run with python -m test.unittest
2010-03-22 01:01:34 +00:00
Michael Foord
b1aa30f94d
Issue 7815. __unittest in module globals trims frames from reported stacktraces in unittest.
2010-03-22 00:06:30 +00:00
Benjamin Peterson
bb9d726357
take into account keyword arguments when passing too many args
2010-03-21 20:30:30 +00:00
Benjamin Peterson
965458931f
improve error message from passing inadequate number of keyword arguments #6474
...
Note this removes the "non-keyword" or "keyword" phrases from these messages.
2010-03-21 20:21:00 +00:00
Benjamin Peterson
54bc22e9f3
don't write duplicate tests
2010-03-21 19:56:37 +00:00
Benjamin Peterson
52b32b6d6a
fix import
2010-03-21 19:54:56 +00:00
Antoine Pitrou
448da71807
Issue #3890 : Fix recv() and recv_into() on non-blocking SSL sockets.
2010-03-21 19:33:38 +00:00
Florent Xicluna
77a8849505
#8180 : Fix test_pep277 on OS X and add more tests for special Unicode normalization cases.
2010-03-21 18:00:38 +00:00
Benjamin Peterson
e39b2ec6ca
rewrite a bit
2010-03-21 17:34:54 +00:00
Florent Xicluna
cf82fa6f91
Issue #8179 : Fix macpath.realpath() on a non-existing path.
2010-03-21 12:27:20 +00:00
Florent Xicluna
b88fbf4fef
Use assertRaises and add a specific warning filter.
2010-03-21 11:58:11 +00:00
Florent Xicluna
3f5d146323
No more deprecation warnings for distutils.sysconfig, following r78666.
...
But when the "dl" module is available, it gives a py3k deprecation warning.
2010-03-21 11:50:17 +00:00
Florent Xicluna
af61719ec3
Silence some py3k SyntaxWarning using check_py3k_warnings() with "exec" statements.
2010-03-21 11:03:21 +00:00
Florent Xicluna
8f43cec41b
Fix py3k warnings in test_decimal, using unittest.assertItemsEqual.
2010-03-21 10:51:40 +00:00
Florent Xicluna
4a0f8b89f6
Silence more py3k warnings in unittest.case.
2010-03-21 10:50:44 +00:00
Florent Xicluna
0762788081
#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.
2010-03-21 01:14:24 +00:00
Michael Foord
8cb253f8d6
Change order of arguments in a unittest function.
2010-03-21 00:55:58 +00:00
Michael Foord
73dbe04619
A faulty load_tests in a test module no longer halts test discovery. A placeholder test, that reports the failure, is created instead.
2010-03-21 00:53:39 +00:00
Florent Xicluna
fc5f6a7f40
Cleanup test_tarfile, and use check_warnings.
2010-03-20 22:26:42 +00:00
Florent Xicluna
db4a321fea
Cleanup test_struct using check_warnings.
2010-03-20 22:21:02 +00:00
Michael Foord
98e7b7644b
Issue 7832: renaming unittest.TestCase.assertSameElements to assertItemsEqual and changing behaviour
2010-03-20 03:00:34 +00:00
Florent Xicluna
2e6d2622bd
#8178 Cleanup the threads after test_thread.TestForkInThread.
2010-03-20 00:17:46 +00:00
Florent Xicluna
bc27c6a5aa
Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* and setUp/tearDown.
2010-03-19 18:34:55 +00:00
Matthias Klose
e9fbf2b943
- Issue #1039 , #8154 : Fix os.execlp() crash with missing 2nd argument.
2010-03-19 14:45:06 +00:00
Benjamin Peterson
f4fd0bf7c1
keep DeprecationWarning from failing test
2010-03-19 01:06:33 +00:00
Benjamin Peterson
52d4aeac86
make compiler's py3k warning a full deprecation warning #6837
2010-03-18 23:12:43 +00:00
Benjamin Peterson
e30b3fa17a
these lines can now be dispensed with
2010-03-18 22:44:54 +00:00
Collin Winter
001a3952c9
Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.
...
Patch by Reid Kleckner!
2010-03-18 21:54:01 +00:00
Florent Xicluna
2e0a53fdf6
Issue #8024 : Update the Unicode database to 5.2
2010-03-18 21:50:06 +00:00
Florent Xicluna
735885428d
#8155 : Preserve backward compatibility for test_support.check_warnings(). Add regression tests.
2010-03-18 19:51:47 +00:00
Senthil Kumaran
f3e9b2a996
Fix for Issue8135 - urllib.unquote to support mixed percent escapes
2010-03-18 12:14:15 +00:00
Collin Winter
43fe03a206
Make test_pwd more stable in the face of unusual LDAP/NIS/Kerberos deployments (the old test was flaky on Google buildslaves).
2010-03-18 00:10:34 +00:00
Antoine Pitrou
d7b731d160
Issue #8104 : socket.recv_into() and socket.recvfrom_into() now support
...
writing into objects supporting the new buffer API, for example bytearrays
or memoryviews.
2010-03-17 22:45:39 +00:00
Collin Winter
2227251a4e
Fix a race condition in test_asynchat uncovered by the Unladen Swallow JIT.
2010-03-17 22:36:26 +00:00
Benjamin Peterson
0dee9c1b5c
prevent lambda functions from having docstrings #8164
2010-03-17 20:41:42 +00:00
Florent Xicluna
78c1871d21
Fix and check cgi module deprecation warnings. Revert an unwanted rename in test_import.
2010-03-17 20:05:11 +00:00
Florent Xicluna
945a8ba635
Cleanup some test cases using check_warnings and check_py3k_warnings.
2010-03-17 19:15:56 +00:00
Florent Xicluna
2b73c21bed
Cleanup in test_import and test_coding.
2010-03-17 19:05:04 +00:00
Collin Winter
786431282b
Avoid hardcoding refcounts in tests.
2010-03-17 17:36:16 +00:00
Vinay Sajip
2060e42206
Issue #8162 : logging: Clarified docstring and documentation for disable function.
2010-03-17 15:05:57 +00:00
Ezio Melotti
187f93d986
Use "x in y" instead of y.find(x) != -1.
2010-03-17 14:22:34 +00:00
Ezio Melotti
d80b4bfd0b
#7092 : silence some more py3k warnings.
2010-03-17 13:52:48 +00:00
Collin Winter
8b3f1ce591
Delete unused import.
2010-03-17 03:04:01 +00:00
Collin Winter
89b4f13024
Style cleanup in test_import.
2010-03-17 02:40:12 +00:00
Collin Winter
ac1d93167c
Fix a trivial class of (hypothetical, future) false-positive refleaks, discovered by an optimization in Unladen Swallow's past (which will become CPython's future).
2010-03-17 02:02:30 +00:00
Matthias Klose
8b41168bab
- Issue #4961 : Inconsistent/wrong result of askyesno function in tkMessageBox
...
with Tcl/Tk-8.5.
2010-03-16 10:48:52 +00:00
Florent Xicluna
3cc8f211ed
Issue #7783 and #7787 : open_urlresource invalidates the outdated files from the local cache.
...
Use this feature to fix test_normalization.
2010-03-15 18:08:58 +00:00
Matthias Klose
fae23dc9dc
- Fix typo in Lib/compileall.py(__all__).
2010-03-15 18:00:01 +00:00
Matthias Klose
b13d04c991
- Issue #8140 : extend compileall to compile single files. Add -i option.
2010-03-15 17:44:12 +00:00
Matthias Klose
358e7ff36b
- Issue #7356 : ctypes.util: Make parsing of ldconfig output independent of
...
the locale.
2010-03-15 13:42:23 +00:00
Matthias Klose
54cc539a2b
- Issue #6949 : Allow the _bsddb extension to be built with db-4.8.x.
2010-03-15 12:46:18 +00:00
Benjamin Peterson
f56813997f
clean up files correctly
2010-03-15 03:02:37 +00:00
Benjamin Peterson
5a4c0f5cc2
remove mac 9 code
2010-03-15 03:00:35 +00:00
Benjamin Peterson
ca02f3a4d6
this little exception dance is pointless
2010-03-15 02:58:24 +00:00
Florent Xicluna
ece29b2aac
Do not hardcode Expat version. It's possible to build Python with --with-system-expat option.
2010-03-14 15:20:59 +00:00