Ezio Melotti
0263da547e
Add a test for normpath to test_macpath.
2010-02-27 12:42:52 +00:00
Florent Xicluna
f4b6186d9c
#691291 : codecs.open() should not convert end of lines on reading and writing.
2010-02-26 10:40:58 +00:00
Senthil Kumaran
e9a78083c0
Fix for Issue7540 ; urllib2 will raise a TypeError when you try to add_data to
...
a existing req object already having data.
2010-02-24 20:55:31 +00:00
Senthil Kumaran
8526adfbd9
Fix for Issue3819 - urllib2 sends Basic auth across redirects
2010-02-24 16:45:46 +00:00
Eric Smith
2d9856d6ce
Issue #7309 : Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
2010-02-24 14:15:36 +00:00
Dirkjan Ochtman
ebc73dce57
Issue #7427 : improve the representation of httplib.BadStatusLine exceptions.
2010-02-24 04:49:00 +00:00
Victor Stinner
f20f9c299e
Issue #7649 : Fix u'%c' % char for character in range 0x80..0xFF
...
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Dirkjan Ochtman
8614817875
Fix #1537721 : add writeheader() method to csv.DictWriter.
...
Reviewed by skip.montanaro and thomas.wouters.
2010-02-23 21:09:52 +00:00
Michael Foord
d99ef9a9df
unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects.
2010-02-23 17:00:53 +00:00
Mark Dickinson
cf80f04b16
Fix spacing nit. Thanks Eric Smith for the public humiliation.
2010-02-23 13:06:50 +00:00
Mark Dickinson
8ee9187a16
Make global variable overflowok into a keyword argument; this fixes a failure when running ./python -m test.regrtest -R 3:2: test_format
2010-02-23 12:53:52 +00:00
Tarek Ziadé
48cc8dc958
added make_archive (and secondary APIs) to shutil
2010-02-23 05:16:41 +00:00
R. David Murray
f28fd24c36
Issue 6292: for the moment at least, the test suite passes if run
...
with -OO. Tests requiring docstrings are skipped. Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Eric Smith
87bcb243ac
Issue #6902 : Fix problem with built-in types format incorrectly with 0 padding.
2010-02-23 00:11:16 +00:00
Michael Foord
ae3db0a12b
Support for old TestResult object (unittest) with warnings when using unsupported features.
2010-02-22 23:28:32 +00:00
Jack Diederich
5cac46dd41
* fix issue#7476
2010-02-22 21:27:38 +00:00
Jack Diederich
1ce6136018
fixes issue #1522237 , bad init check in _threading_local
2010-02-22 19:55:22 +00:00
Andrew M. Kuchling
b72b0eb357
#7627 : MH.remove() would fail if the MH mailbox was locked;
...
it would call _unlock_file() and pass it a closed file object. Noted by Rob Austein.
2010-02-22 18:42:07 +00:00
Eric Smith
f32d4acead
Issue #7988 : Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types.
2010-02-22 18:33:47 +00:00
Michael Foord
2f6775617c
Silence UnicodeWarning in crazy unittest test.
2010-02-21 14:48:59 +00:00
Mark Dickinson
92cb4a8c6f
Reduce number of random tests in test_strtod, to avoid hogging buildbot time.
2010-02-21 14:42:27 +00:00
Mark Dickinson
45ad801ed0
Issue #7384 : skip test_curses on FreeBSD, in order to allow other buildbot tests to complete.
2010-02-21 13:37:53 +00:00
Mark Dickinson
82b34c5dbe
Issue #5211 : Fix complex type to avoid implicit calls to
...
complex.__coerce__. Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
Ezio Melotti
9e9af21d45
skip tests with a non-ascii cwd when the file system encoding is ascii
2010-02-20 22:34:21 +00:00
Senthil Kumaran
18d5a69669
Fix for Issue7751: urllib.urlopen("///C|/foo/bar/spam.foo")
2010-02-20 22:05:34 +00:00
Ezio Melotti
e3467d5c96
Remove e assertIs definitions and use correct assert* methods.
2010-02-20 09:40:07 +00:00
Ezio Melotti
4cc80ca921
#3426 : os.path.abspath now returns unicode when its arg is unicode.
2010-02-20 08:09:39 +00:00
Senthil Kumaran
4e78de89d0
Fix for Issue7904. urlparse.urlsplit to handle schemes in the way defined by RFC3986
2010-02-19 07:32:48 +00:00
Fred Drake
cc43b56960
- apply patch from issue 7005
...
- add corresponding documentation
2010-02-19 05:24:30 +00:00
Michael Foord
c2294dd6ba
Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode issues when constructing failure messages. Issue 7956
2010-02-18 21:37:07 +00:00
Michael Foord
225a099fe5
unittest.TestCase uses safe_repr for producing failure messages. Partial fix for issue 7956
2010-02-18 20:30:09 +00:00
Mark Dickinson
6d8effb1fc
Issue #7633 : Context method in the decimal module (with the exception
...
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted. Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Ezio Melotti
e511fc7979
#7930 : fix stripid
2010-02-16 23:26:09 +00:00
Mark Dickinson
876473bcc8
Check that 'd' isn't allowed as an exponent specifier in inputs to the float function.
2010-02-12 21:16:38 +00:00
R. David Murray
7c29f071d5
Issue 5754: tweak shelve doc wording to make it clearer that even when
...
writeback=True values are written to the backing store when assigned to
the shelf. Add test to confirm that this happens. Doc patch and added
test by Robert Lehmann. I also fixed the cross references to the sync
and close methods.
2010-02-11 01:38:42 +00:00
Ezio Melotti
8f6a287029
#7712 : add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch.
2010-02-10 21:40:33 +00:00
Michael Foord
1c3abf475e
Fix for unittest tests, to be merged to py3k
2010-02-10 15:50:58 +00:00
Michael Foord
db43b5a1f5
Issue 7893 and Issue 7588
2010-02-10 14:25:12 +00:00
Antoine Pitrou
42fb6ab491
Issue #2746 : Don't escape ampersands and angle brackets ("&", "<", ">")
...
in XML processing instructions and comments. These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction. Patch by Neil Muller.
2010-02-09 17:08:05 +00:00
Georg Brandl
11f5c9e001
Convert test failure from output-producing to self.fail().
2010-02-08 22:48:37 +00:00
Michael Foord
fe6349c965
Make assertMultiLineEqual the default for comparing unicode strings.
2010-02-08 22:41:16 +00:00
Georg Brandl
0c4783a33c
Fix missing string formatting placeholder.
2010-02-08 22:40:51 +00:00
Vinay Sajip
cfc43e9435
logging: gingerly re-enabling skipped tests after improving thread sync code in configurator.
2010-02-08 21:18:15 +00:00
Vinay Sajip
9a164ac800
Issue #7857 : Another attempt to keep the buildbots happy.
2010-02-08 16:05:50 +00:00
Vinay Sajip
e1ec841086
logging: skipped listening tests because they're not working reliably.
2010-02-08 15:32:08 +00:00
Vinay Sajip
7ed8001862
Removed spurious print statement in test.
2010-02-08 06:50:14 +00:00
Georg Brandl
6eedef60a2
Fix test_fnmatch.
2010-02-08 00:04:54 +00:00
Mark Dickinson
841e7f3ae2
Skip test_strtod entirely when correctly-rounded string->float isn't implemented
2010-02-07 20:31:10 +00:00
Ronald Oussoren
dd25e86cf4
Issue 6003: ZipFile.writestr "compression_type" argument
2010-02-07 20:18:02 +00:00
Michael Foord
2bd52dcccb
assertRaises as context manager now allows you to access exception as documented
2010-02-07 18:44:12 +00:00
Georg Brandl
a4f46e1292
Remove unused imports in test modules.
2010-02-07 17:03:15 +00:00
Georg Brandl
dc3694bee0
Rename "exc_value" attribute on assertRaises context manager to "exception".
2010-02-07 17:02:22 +00:00
Antoine Pitrou
4ad752d70f
Issue #7870 : Remove duplicate test methods. Reported by Georg Brandl.
2010-02-07 16:56:23 +00:00
Mark Dickinson
1224f4afb4
Actually raise on failure, instead of doing nothing.
2010-02-07 13:09:52 +00:00
Mark Dickinson
4dcba97590
Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed.
2010-02-07 13:01:56 +00:00
Georg Brandl
b86d3fa43c
Remove duplicate test method.
2010-02-07 12:55:12 +00:00
Georg Brandl
308e18b595
Add a minimal test for fnmatchcase().
2010-02-07 12:34:26 +00:00
Georg Brandl
a34f87f981
Fix a redefined test method.
2010-02-07 12:27:06 +00:00
Georg Brandl
41dc63fae5
Fix two redefined test methods.
2010-02-07 12:25:50 +00:00
Georg Brandl
b3cda98dd1
Fix wrong usage of "except X, Y:".
2010-02-07 12:19:43 +00:00
Georg Brandl
7ae6018788
Fix another duplicated test method.
2010-02-07 12:16:12 +00:00
Ronald Oussoren
ab3f5cbabd
A number of APIs in macostools cannot work in 64-bit mode because they
...
use Carbon APIs that aren't available there.
This patch disables tests for the affected entrypoints in macostools and
mentions this in the documentation.
In theory it is possible to replace the implementation by code that does
work in 64-bit mode, but that would require further updates to the Carbon
wrappers because the modern APIs aren't wrapped properly.
2010-02-07 11:38:28 +00:00
Vinay Sajip
657514a690
Issue #7868 : logging: added loggerClass attribute to Manager.
2010-02-07 01:37:08 +00:00
Georg Brandl
12cad204a0
Add missing import.
2010-02-06 23:58:25 +00:00
Georg Brandl
cd4a21bb8e
Fix more unbound locals in code paths that do not seem to be used.
2010-02-06 23:34:10 +00:00
Georg Brandl
bd564c3c21
Fix import/access for some identifiers. _TestSharedCTypes does not seem to be executed?
2010-02-06 23:33:33 +00:00
Georg Brandl
c7ca56d213
We heard you like test failures so we put unbound locals in your test so that you can fail while you fail.
2010-02-06 23:23:45 +00:00
Georg Brandl
d10d8ee2a1
Fix various missing import/unbound name errors.
2010-02-06 23:18:00 +00:00
Georg Brandl
1a0ffe168a
Remove duplicate test method.
2010-02-06 23:12:19 +00:00
Georg Brandl
d1fa76e742
Add missing import.
2010-02-06 23:12:12 +00:00
Mark Dickinson
28d4f9e668
testCopysign was defined twice in test_math; combine the definitions
2010-02-06 23:11:25 +00:00
Georg Brandl
df8a303dff
Fix a few UnboundLocalErrors in test_long.
2010-02-06 23:08:00 +00:00
Georg Brandl
8fd107f8ea
Add missing imports.
2010-02-06 23:06:24 +00:00
Georg Brandl
7224350656
Add a missing import.
2010-02-06 23:02:29 +00:00
Benjamin Peterson
239f138aea
make waiting for the server to start robust
2010-02-06 22:08:15 +00:00
Georg Brandl
26a1f72637
Remove unused imports from test_logging.
2010-02-06 21:54:40 +00:00
Vinay Sajip
7f22443d94
Issue #7857 : Gave server thread more time to get ready, and re-enabled a skipped test.
2010-02-06 20:28:36 +00:00
Benjamin Peterson
42d5947ef5
check type_getattro for correctness in a descriptor corner case
2010-02-06 20:14:10 +00:00
Vinay Sajip
5749d88243
Issue #7857 : Tentatively re-enabling one test to see effect on buildbots.
2010-02-06 20:00:43 +00:00
R. David Murray
ce6e4b0930
issue #7728 : test_timeout was using a hardcoded port, which was
...
causing buildbot failures. Changed to use test_support.bind_port.
Patch by Florent Xicluna.
2010-02-06 04:27:21 +00:00
Michael Foord
0877060f86
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
2010-02-06 00:22:26 +00:00
Vinay Sajip
2373926964
test_logging: minor tweaks to timeouts, listening tests marked as skipped.
2010-02-05 23:43:11 +00:00
Antoine Pitrou
bb445a1f22
Issue #5677 : Explicitly forbid write operations on read-only file objects,
...
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter. Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Vinay Sajip
007a618a38
Issue #7857 : test_logging: listener tests disabled for now.
2010-02-05 15:40:20 +00:00
Vinay Sajip
3dd734fe03
Issue #7857 : test_logging: listener test now uses find_unused_port().
2010-02-05 14:52:05 +00:00
Benjamin Peterson
565d78586b
normalize exceptions passed to the __exit__ method #7853
...
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Benjamin Peterson
4a7ff1d80a
add a test for #7853 ; the exception must be normalized for with
2010-02-05 01:53:27 +00:00
Vinay Sajip
f7610b23de
Added unit test for cfg:// resolution.
2010-02-04 21:40:56 +00:00
Vinay Sajip
28c382f73a
Logging: Implemented PEP 391.
2010-02-04 18:48:53 +00:00
Brett Cannon
dc84f8fbb4
Fix a typo in a docstring introduced in r77956.
2010-02-03 22:13:44 +00:00
Brett Cannon
18e4db5ebe
Update a docstring to suggest using importlib.import_module instead of calling __import__ directly.
2010-02-03 22:11:54 +00:00
Mark Dickinson
c68e9f0d20
Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942).
2010-02-03 16:50:14 +00:00
Ezio Melotti
dde5b94875
#7092 : Silence more py3k warnings. Patch by Florent Xicluna.
2010-02-03 05:37:26 +00:00
Tarek Ziadé
e81b0289b6
sysconfig.get_scheme_names now returns a sorted tuple
2010-02-02 22:54:28 +00:00
Ezio Melotti
1f517e1d53
#7092 : Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
2010-02-02 17:34:37 +00:00
Ezio Melotti
8d3f130d41
Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna.
2010-02-02 15:57:45 +00:00
Ezio Melotti
0ac4d4c82d
Silence a couple of -3 warnings
2010-02-02 15:12:42 +00:00
Ezio Melotti
5d62cfe070
#7092 : silence py3k warnings for bsddb. Patch by Florent Xicluna.
2010-02-02 08:37:35 +00:00
Victor Stinner
b4b0a2935d
Issue #7819 : Check sys.call_tracing() arguments types.
...
py3k was already patched by issue #3661 .
2010-01-31 22:32:15 +00:00
Antoine Pitrou
f3fa074703
- Issue #6939 : Fix file I/O objects in the `io` module to keep the original
...
file position when calling `truncate()`. It would previously change the
file position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
2010-01-31 22:26:04 +00:00
Benjamin Peterson
7aedb3b30e
fix windows buildbot
2010-01-31 18:02:35 +00:00
Ezio Melotti
ef4909643d
#7092 : silence more -3 and -Wd warnings
2010-01-31 11:46:54 +00:00
Ezio Melotti
a2d4653740
#7092 : silence py3k warnings for deprecated modules
2010-01-30 07:22:54 +00:00
Mark Dickinson
36ecd676ea
Issue #7788 : Fix a crash produced by deleting a list slice with huge
...
step value. Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Antoine Pitrou
94c33ebfa8
Issue #7610 : Reworked implementation of the internal
...
:class:`zipfile.ZipExtFile` class used to represent files stored inside
an archive. The new implementation is significantly faster and can
be wrapped in a :class:`io.BufferedReader` object for more speedups.
It also solves an issue where interleaved calls to `read()` and
`readline()` give wrong results. Patch by Nir Aides.
2010-01-27 20:59:50 +00:00
Jesse Noller
654ade3e6a
Issue #6963 : Added maxtasksperchild argument to multiprocessing.Pool
2010-01-27 03:05:57 +00:00
Benjamin Peterson
2deb5c758a
raise a clear TypeError when trying to register a non-class
2010-01-27 02:16:42 +00:00
Eric Smith
74c2577497
Added named (but not numbered) attributes to sys.getwindowsversion() test.
2010-01-27 02:06:25 +00:00
Eric Smith
59529e1ef6
Switch to test_support.get_attribute.
2010-01-27 01:21:15 +00:00
Eric Smith
514e77e0ae
Removed unneeded test.
2010-01-27 00:58:43 +00:00
Eric Smith
ee931b7253
Issue #7766 : Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type.
2010-01-27 00:28:29 +00:00
Benjamin Peterson
a43f34cc2a
fix an UnboundLocalError when the release file is empty #7773
2010-01-25 03:31:13 +00:00
Ezio Melotti
469a05fe46
remove archaic functions from test_support
2010-01-24 20:48:35 +00:00
Ezio Melotti
b0f5adc3f4
use assert[Not]IsInstance where appropriate
2010-01-24 16:58:36 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Tarek Ziadé
c64614e043
fixed the 64bits tests for get_platform() - mac osx
2010-01-23 17:52:57 +00:00
Ezio Melotti
0e4e73240a
Increased the overflow value on test_dealloc to make sure that it is big enough even for wide builds.
2010-01-23 10:43:05 +00:00
Tarek Ziadé
5633a8048f
taking sysconfig out of distutils
2010-01-23 09:23:15 +00:00
Ezio Melotti
f8a9402c97
This should fix the failure introduced in r77680. The error message is now different and it caused the test to fail. The failing test is not present in 2.5 so it is failing only on 2.6 and newer versions.
2010-01-22 16:58:28 +00:00
Mark Dickinson
a3112d1462
Use // for floor division.
2010-01-21 19:58:41 +00:00
Mark Dickinson
5a633488d4
Add two more test_strtod test values.
2010-01-21 18:32:27 +00:00
Mark Dickinson
294d6acb89
Additional testcases for strtod.
2010-01-21 17:02:53 +00:00
Mark Dickinson
4141d65fb7
Various dtoa.c cleanups. 1. Despagghetify _Py_dg_strtod parsing code
...
and exit points. 2. Simplify bigcomp comparison loop. 3. Don't set
ERANGE on _Py_dg_strtod underflow (it was set inconsistently anyway).
4. Remove unused dsign field from BCinfo struct.
2010-01-20 17:36:31 +00:00
Gregory P. Smith
8926108bfb
Revert debugprint code in r77607.
2010-01-19 08:25:26 +00:00
Gregory P. Smith
8f6f42621a
Add a pydebug mode only debug print to help debug the errors in
...
http://www.python.org/dev/buildbot/all/builders/x86%20gentoo%20trunk/builds/5700/
Will be removed shortly.
2010-01-19 08:01:00 +00:00
Benjamin Peterson
9179dab3f4
data descriptors do not override the class dictionary if __get__ is not defined
...
Adjust documentation and add a test to verify this behavior.
See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for
discussion.
2010-01-18 23:07:56 +00:00
Antoine Pitrou
e80a6a4ead
Issue #7561 : Operations on empty bytearrays (such as `int(bytearray())`)
...
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL. The macro now returns a statically allocated empty
string instead.
2010-01-17 12:26:20 +00:00
Mark Dickinson
ab6ee7a042
Increase number of strtod tests slightly, to make it more likely that a memory leak is detected.
2010-01-17 11:10:03 +00:00
Mark Dickinson
d87f22cec8
Add better error reporting for MemoryErrors caused by str->float conversions.
2010-01-16 20:33:02 +00:00
Mark Dickinson
811ff822f8
Issue #7632 : Fix one more case of incorrect rounding for str -> float
...
conversion (see bug 5 in the issue tracker).
2010-01-16 17:57:49 +00:00
Antoine Pitrou
db983a7c38
Followup to #7703 : a2b_hqx() didn't follow the new buffer API (neither in trunk
...
nor in py3k). Patch by Florent Xicluna as well as additional tests.
2010-01-16 17:45:56 +00:00
Mark Dickinson
476279f18b
Issue #7632 : Fix a serious wrong output bug for string -> float conversion.
...
Also remove some now unused variables, and add comments clarifying the
possible outputs of the parsing section of _Py_dg_strtod. Thanks
Eric Smith for reviewing.
2010-01-16 10:44:00 +00:00
Benjamin Peterson
667dc19130
try to fix for windows
2010-01-15 02:26:07 +00:00
Antoine Pitrou
c391ad007b
Issue #7701 : Fix crash in binascii.b2a_uu() in debug mode when given a
...
1-byte argument. Patch by Victor Stinner.
2010-01-15 00:18:00 +00:00
Antoine Pitrou
efdddd3370
Issue #3299 : Fix possible crash in the _sre module when given bad
...
argument values in debug mode. Patch by Victor Stinner.
2010-01-14 17:25:24 +00:00
Antoine Pitrou
fd3a60d5ef
Issue #7703 : Add support for the new buffer API to functions of the
...
binascii module. Backported from py3k by Florent Xicluna, with some
additional tests.
2010-01-14 16:27:09 +00:00
Mark Dickinson
647ed91d5c
Issue #7632 : add tests for bugs fixed so far.
2010-01-14 15:22:33 +00:00
Benjamin Peterson
7a1b435297
use more robust quoting
2010-01-14 02:40:10 +00:00
Antoine Pitrou
5f76d132a5
Issue #7625 : Add more tests that bytearray methods return new objects,
...
even if identical. Patch by Florent Xicluna (again).
2010-01-13 15:02:13 +00:00
Antoine Pitrou
5a9112c0cc
Issue #2846 : Add support for gzip.GzipFile reading zero-padded files.
...
Patch by Brian Curtin.
2010-01-13 14:32:10 +00:00
Mark Dickinson
5ff4f279e6
Issue #7632 : Fix a bug in dtoa.c that could lead to incorrectly-rounded results.
2010-01-12 22:55:51 +00:00
Mark Dickinson
8efef5ce9f
Issue #7632 : Fix a problem with _Py_dg_strtod that could lead to
...
crashes in debug builds, for certain long numeric strings
corresponding to subnormal values.
2010-01-12 22:23:56 +00:00
Antoine Pitrou
efa45f35b5
Issue #7654 : enable additional bytes/bytearray tests. Patch by Florent Xicluna.
2010-01-12 22:02:10 +00:00
Ezio Melotti
b5689de044
#5827 : make sure that normpath preserves unicode
2010-01-12 03:32:05 +00:00
Alexandre Vassalotti
58a96efde5
Fixed repr of dictionary views.
2010-01-12 01:34:43 +00:00
Alexandre Vassalotti
69eb51697c
Issue #1967 : Backport dictionary views.
2010-01-11 23:17:10 +00:00
Alexandre Vassalotti
b646547bb4
Issue #2333 : Backport set and dict comprehensions syntax.
2010-01-11 22:36:12 +00:00
Benjamin Peterson
e822ab0166
fix test_popen when the path to python has spaces #7671
2010-01-10 20:42:03 +00:00
Senthil Kumaran
2e3da14d8b
Fixed issue7648 - test_urllib2 fails on Windows if not run from C:
2010-01-10 17:35:05 +00:00
Martin v. Löwis
9d87323445
Update root certificate to CAcert.
2010-01-10 10:29:54 +00:00
Brett Cannon
6fdd3dcb6a
DeprecationWarning is now silent by default.
...
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.
Closes issue #7319 . Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
2010-01-10 02:56:19 +00:00
Alexandre Vassalotti
ee936a2130
Issue #2335 : Backport set literals syntax from Python 3.x.
2010-01-09 23:35:54 +00:00
Mark Dickinson
e365613528
Issue #7532 : Add additional slicing test cases for new- and old-style
...
classes. Patch by Florent Xicluna.
2010-01-09 18:50:50 +00:00
Antoine Pitrou
5b77d6dfa3
Remove obsolete warning filters in regrtest.py (from issue #7092 -- patch by
...
Florent Xicluna).
2010-01-08 19:39:04 +00:00
Senthil Kumaran
7a2ee0b460
Fix for Issue7026. For the Error - RuntimeError: dictionary changed size during iteration
2010-01-08 19:20:25 +00:00
Antoine Pitrou
8015725d4f
Issue #7092 : Remove py3k warning when importing cPickle. 2to3 handles
...
renaming of `cPickle` to `pickle`. The warning was annoying since there's
no alternative to cPickle if you care about performance. Patch by Florent
Xicluna.
2010-01-08 19:20:17 +00:00
Senthil Kumaran
ce8e33a095
Reverting the Revision: 77368. I committed Flox's big patch for tests by
...
mistake. ( It may come in for sure tough)
2010-01-08 19:04:16 +00:00
Senthil Kumaran
3ddc435af6
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
2010-01-08 18:41:40 +00:00
Mark Dickinson
3194d1454c
Backport some float repr tests that were missed in issue 7117.
2010-01-08 16:53:56 +00:00
Antoine Pitrou
0d423b870b
Issue #7455 : Fix possible crash in cPickle on invalid input. Patch by
...
Florent Xicluna.
2010-01-07 17:46:49 +00:00
Georg Brandl
8904053003
#5991 : let completion for the "help" command include help topics.
...
This also simplifies the Cmd.get_names() method implementation; it was written
at a time where dir() didn't consider base class attributes.
2010-01-06 18:02:16 +00:00
Georg Brandl
5089a38af2
Small fixes to test_cmd: fix signature of do_shell, remove duplicate import, add option to run the custom Cmd class.
2010-01-06 17:43:06 +00:00
Benjamin Peterson
2b6e4bc3ad
add a test about hashing array.array
2010-01-05 00:04:19 +00:00
Antoine Pitrou
af45b11527
Kill a couple of "<>"
2010-01-04 23:28:16 +00:00
Benjamin Peterson
ecdae19fbe
do correct lookup of the __complex__ method
2010-01-04 00:43:01 +00:00
Antoine Pitrou
673ddf9907
Issue #7471 : Improve the performance of GzipFile's buffering mechanism,
...
and make it implement the `io.BufferedIOBase` ABC to allow for further
speedups by wrapping it in an `io.BufferedReader`. Patch by Nir Aides.
2010-01-03 22:29:56 +00:00
Gregory P. Smith
49d709c921
Fix testSourceAddress to not test the host, it wasn't passing on some platforms.
2010-01-03 15:05:52 +00:00
Gregory P. Smith
9d3252154f
issue3972: HTTPConnection and HTTPSConnection now support a
...
source_address parameter.
Also cleans up an annotation in the socket documentation.
2010-01-03 02:06:07 +00:00
Gregory P. Smith
79a3eb1058
Adds an optional source_address parameter to socket.create_connection().
...
For use by issue3972.
2010-01-03 01:29:44 +00:00
Gregory P. Smith
6dcdcde2a8
Import all implementations of the hash algorithms (OpenSSL & builtin) and run
...
the test suite across all that are available. Warns about extension modules
that could not be imported when python was compiled with Py_DEBUG.
That warning could be made fatal but I didn't want to do that initially as
I suspect non setup.py based build processes (windows, any others?) won't
compile them all conditionally based on the Py_DEBUG setting today.
2010-01-03 00:19:04 +00:00
Gregory P. Smith
443ec6875f
Issue #3745 : Undo the requirement for new buffer API only objects to be passed
...
to hashlib functions in python 2.x. The module now uses the 's*' for argument
parsing which auto encodes unicode objects to the system default encoding for
us.
2010-01-02 22:28:48 +00:00
Antoine Pitrou
b538d546da
Remove silly conditional.
2010-01-02 21:53:44 +00:00
Antoine Pitrou
83f86e8e98
Add tests for issue #7458 : str.rfind() would crash when called with an invalid
...
start value. The offending code itself was removed as part of #7462 .
This patch by Victor Stinner.
2010-01-02 21:47:10 +00:00
Antoine Pitrou
5b7139aab4
Issue #7462 : Implement the stringlib fast search algorithm for the `rfind`,
...
`rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
2010-01-02 21:12:58 +00:00
Mark Dickinson
1b34d2552c
Issue #5080 : turn the DeprecationWarning from float arguments passed
...
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
2010-01-01 17:27:30 +00:00
Georg Brandl
8cdc9bc901
More yearly updates.
2010-01-01 13:07:05 +00:00
Ezio Melotti
763f1e8d32
indentation and further alignment with py3k
2009-12-31 13:27:41 +00:00
Ezio Melotti
6d6b53cab8
cleanup and refactoring
2009-12-31 13:00:43 +00:00
Benjamin Peterson
0f02d3933b
check if the attribute is set before deleting it with T_OBJECT_EX ( fixes #7604 )
...
Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
2009-12-30 19:34:10 +00:00
Mark Dickinson
99d652ef66
Issue #7534 : Fix handling of nans, infinities, and negative zero in **
...
operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch.
2009-12-30 12:12:23 +00:00
Ezio Melotti
569e61f351
#5511 : Added the ability to use ZipFile as a context manager. Patch by Brian Curtin.
2009-12-30 06:14:51 +00:00
Amaury Forgeot d'Arc
8645a5c81f
#7413 : Passing '\0' as the separator to datetime.datetime.isoformat()
...
used to drop the time part of the result.
2009-12-29 22:03:38 +00:00
Mark Dickinson
8e3e1d6016
Issue #7575 : An overflow test for math.expm1 was failing on OS X 10.4/Intel,
...
due to a defect in the platform's implementation of expm1. Since the issue
is of low severity, and appears to be fixed in OS X 10.5 and 10.6, it doesn't
seem worth working around, so I'm just weakening the relevant test so that
it passes on 10.4.
2009-12-29 20:51:24 +00:00
Benjamin Peterson
b598393bcb
enable test_main.py
2009-12-29 00:09:33 +00:00
Georg Brandl
740cdc3a9f
#7033 : add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring.
2009-12-28 08:34:58 +00:00
Mark Dickinson
e079636853
Use a more idiomatic check in check_truediv.
2009-12-27 21:31:50 +00:00
Mark Dickinson
4c96035f33
Use ldexp(q, exp) instead of q*2.**exp in true division test, to avoid bogus failures on platforms with broken pow (e.g., Ubuntu/ia64).
2009-12-27 16:16:02 +00:00
Mark Dickinson
4657283647
Issue #1811 : Improve accuracy and consistency of true division for integers.
2009-12-27 14:55:57 +00:00
Ezio Melotti
f84caf4eda
#6108 : unicode(exception) and str(exception) should return the same message
2009-12-24 22:25:17 +00:00
Benjamin Peterson
3293593b54
fix alleged refleak
2009-12-24 01:09:53 +00:00
Gregory P. Smith
9f12d468f4
Fix possible integer overflow in lchown and fchown functions. For issue1747858.
2009-12-23 09:31:11 +00:00
Mark Dickinson
2ba1e9ceb8
Issue #7553 : test_long_future wasn't testing properly. Thanks Florent Xicluna
...
for bug report and patch.
2009-12-21 16:29:21 +00:00
Mark Dickinson
603ae9e371
Issue #7554 : Various fixups in test_cmath.py: remove code duplication,
...
use new-style formatting. Thanks Florent Xicluna for the patch.
2009-12-20 20:34:44 +00:00
Mark Dickinson
ed284991e1
Silence -3 warnings. Thanks Florent Xicluna.
2009-12-20 20:23:01 +00:00
Mark Dickinson
3e0bafef25
Fix for consistency with py3k keyword-only version of assertAlmostEqual
2009-12-20 19:52:36 +00:00
Mark Dickinson
1d2ae215aa
Issue #7554 : Fix incorrect usage of rAssertAlmostEqual. Thanks Florent Xicluna.
2009-12-20 19:45:37 +00:00
Mark Dickinson
b5e348b305
Add missing tests for PyArg_Parse* with format 'h'
2009-12-20 15:57:56 +00:00
Senthil Kumaran
7713acf201
Fix for issue 7291 - urllib2 cannot handle https with proxy requiring auth
...
Refactored HTTPHandler tests and added testcase for proxy authorization.
2009-12-20 06:05:13 +00:00
Mark Dickinson
5ff37ae14b
Issue #3366 : Add error function and complementary error function to
...
math module.
2009-12-19 11:07:23 +00:00
Mark Dickinson
9cae178f21
Issue #3366 : Add expm1 function to math module. Thanks Eric Smith for
...
testing on Windows.
2009-12-16 20:13:40 +00:00
R. David Murray
98e3df38fd
Issue #7396 : fix -s, which was broken by the -j enhancement.
2009-12-16 11:49:46 +00:00
Benjamin Peterson
36902988a6
remove lib2to3 resource
2009-12-16 03:28:52 +00:00
R. David Murray
c7298ff0fa
Issue #7498 : make test_multiprocessing use test_support.find_unused_port
...
instead of a hard coded port number in test_rapid_restart.
2009-12-14 21:57:39 +00:00
R. David Murray
0a0a1a842c
Issue #1680159 : unicode coercion during an 'in' operation was masking
...
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context. This patch lets any errors through, as was already
done during coercion of the right hand side.
2009-12-14 16:28:26 +00:00
Benjamin Peterson
ddd392cbb9
accept None as the same as having passed no argument in file types #7349
...
This is for consistency with imitation file objects like StringIO and BytesIO.
This commit also adds a few tests, where they were lacking for concerned
methods.
2009-12-13 19:19:07 +00:00
Ezio Melotti
e304852e21
#7342 : make sure that the datetime object in test_fraction always has a number of microseconds != 0
2009-12-13 18:54:53 +00:00
Benjamin Peterson
414721614f
make StringIO like other file objects in that readline(-1) has no effect #7348
2009-12-13 17:29:16 +00:00
Benjamin Peterson
4895af4ef1
fix the ignoring of __cmp__ method on metaclasses #7491
2009-12-13 16:36:53 +00:00
Antoine Pitrou
c169c781a8
Issue #7466 : segmentation fault when the garbage collector is called
...
in the middle of populating a tuple. Patch by Florent Xicluna.
(note: no NEWS entry for trunk since the bug was introduced in 2.7/3.1)
2009-12-12 19:13:08 +00:00
Mark Dickinson
9be87bc992
Issue #3366 : Add lgamma function to math module.
2009-12-11 17:29:33 +00:00
Raymond Hettinger
a5fd24e97d
Add a reverse() method to collections.deque().
2009-12-10 06:42:54 +00:00
Raymond Hettinger
0b3263b073
Fix variants of deque.extend: d.extend(d) d+=d d.extendleft(d)
2009-12-10 06:00:33 +00:00
R. David Murray
d4e31a4316
Skip new imaplib SSL tests if ssl is not available.
2009-12-09 16:41:39 +00:00
R. David Murray
93321f333c
Issue 5949: fixed IMAP4_SSL hang when the IMAP server response is
...
missing proper end-of-line termination. Patch and tests by
Scott Dial. The new tests include a test harness which will
make it easier to add additional tests.
2009-12-09 15:15:31 +00:00
Antoine Pitrou
29dcdabf40
Make test_pipes a little bit more robust.
2009-12-08 19:46:38 +00:00
Antoine Pitrou
8c54e7819a
Fix the transient refleaks in test_zipimport_support.
...
Diagnosis and original patch by Florent Xicluna (flox).
2009-12-08 19:25:51 +00:00
Benjamin Peterson
a4a04d1a89
fix test_parser from tokenizer tweak
2009-12-06 21:24:30 +00:00
R. David Murray
820b0ea36c
Issue 7431: use TESTFN in test_linecache instead of trying to create a
...
file in the Lib/test directory, which might be read-only for the
user running the tests.
2009-12-03 23:57:59 +00:00
Antoine Pitrou
30b3b35cba
Issue #7333 : The `posix` module gains an `initgroups()` function providing
...
access to the initgroups(3) C library call on Unix systems which implement
it. Patch by Jean-Paul Calderone.
2009-12-02 20:37:54 +00:00
Eric Smith
f2bf0d2a51
Issue #4482 : Add tests for special float value formatting.
2009-12-02 17:43:06 +00:00
Amaury Forgeot d'Arc
d728871ee1
#7419 : Fix a crash on Windows in locale.setlocale() when the category
...
is outside the allowed range.
2009-12-01 21:51:04 +00:00
Raymond Hettinger
e09f45a2e3
Issue 7410: deepcopy of itertools.count resets the count
2009-11-30 19:44:40 +00:00
Eric Smith
c4ab8339e9
Issue #3382 : Make '%F' and float.__format__('F') convert results to upper case. Much of the patch came from Mark Dickinson.
2009-11-29 17:40:57 +00:00
Antoine Pitrou
d16f57bf4d
Issue #1515 : Enable use of deepcopy() with instance methods. Patch by Robert Collins.
2009-11-28 15:55:58 +00:00
Martin v. Löwis
50ea4565bd
Issue #6508 : Add posix.{getresuid,getresgid,setresuid,setresgid}.
2009-11-27 13:56:01 +00:00
Antoine Pitrou
acbe3bdbab
Issue #6845 : Add restart support for binary upload in ftplib. The
...
`storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
argument. Patch by Pablo Mouzo.
(note: the patch also adds a test for the rest argument in retrbinary())
2009-11-27 13:18:34 +00:00
Antoine Pitrou
2dab865ff1
When open_urlresource() fails, HTTPException is another possible error
2009-11-26 12:36:30 +00:00
Antoine Pitrou
bcfaf8007d
Issue #5788 : `datetime.timedelta` objects get a new `total_seconds()` method returning
...
the total number of seconds in the duration. Patch by Brian Quinlan.
2009-11-25 22:59:36 +00:00
Alexandre Vassalotti
8b2d713d32
Issue 7128: Removed reference to the non-existent copyreg module.
...
The reference to copyreg was a unnoticed leftover from the compatibility
support for the grand renaming of the standard library in Python 3. The
compatibility support was reverted in r63493, but not completely as this
patch shows.
Based on a patch by Amaury Forgeot d'Arc.
2009-11-24 17:53:23 +00:00
Mark Dickinson
3e5354934e
Issue #7117 : Update float formatting testcases to match those in py3k.
2009-11-24 15:12:20 +00:00
Jesse Noller
9a03f2fd03
comment out test added in r76438, which caused refleaks
2009-11-24 14:17:29 +00:00
Mark Dickinson
bce783757f
round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this.
2009-11-24 10:54:58 +00:00
Mark Dickinson
9dd5e16c5d
Issue #7117 , continued: Remove substitution of %g-style formatting for
...
%f-style formatting, which used to occur at high precision. Float formatting
should now be consistent between 2.7 and 3.1.
2009-11-23 20:54:09 +00:00
Mark Dickinson
18cfada1ea
Remove restriction on precision when formatting floats. This is the
...
first step towards removing the %f -> %g switch (see issues 7117,
5859).
2009-11-23 18:46:41 +00:00
Senthil Kumaran
5c456e6f45
Fix for issue1488943 - difflib.Differ() doesn't always add hints for tab
...
characters.
2009-11-23 18:41:31 +00:00
Lars Gustäbel
12adc655c8
Add a testcase that checks if the TarFile constructor successfully
...
closes the internal file object in case of an error (issue #7341 ).
2009-11-23 15:46:19 +00:00
Lars Gustäbel
dd866d57af
Issue #6123 : Fix opening empty archives and files.
...
(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)
The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)
In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.
The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
2009-11-22 18:30:53 +00:00
Jesse Noller
814d02dcd1
issue6615: Additional test for logging support in multiprocessing
2009-11-21 14:38:23 +00:00
Mark Dickinson
c4920e86ef
Issue #7272 : Add configure test to detect whether sem_open works
...
properly, and use this to skip test_multiprocessing on platforms
where sem_open raises a signal. This should fix some FreeBSD buildbot
failures for test_multiprocessing.
2009-11-20 19:30:22 +00:00
Benjamin Peterson
99a5023c80
improve several corner cases related with argument names in parenthesis
...
- Fix #7362 : give a good error message for parenthesized arguments with
defaults.
- Add a py3k warning for any parenthesized arguments since those are not allowed
in Py3. This warning is not given in tuple unpacking, since that incurs the
tuple unpacking warning.
2009-11-19 22:54:57 +00:00
Benjamin Peterson
dc3c239b1e
#5037 proxy __unicode__ correctly
2009-11-19 03:00:02 +00:00
Mark Dickinson
bd15a06fd3
Issue #7117 , continued: Change round implementation to use the correctly-rounded
...
string <-> float conversions; this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
2009-11-18 19:33:35 +00:00
Nick Coghlan
815521fca0
Correctly escape arbitrary error message text in the runpy unit tests
2009-11-18 11:27:53 +00:00
Nick Coghlan
4b953bac94
Allow for backslashes in file paths passed to the regex engine
2009-11-16 03:57:32 +00:00
Nick Coghlan
4976e3287a
Account for another cache when hunting ref leaks
2009-11-16 03:55:51 +00:00
Antoine Pitrou
ccd5e02d2b
Issue #2054 : ftplib now provides an FTP_TLS class to do secure FTP using
...
TLS or SSL. Patch by Giampaolo Rodola'.
2009-11-15 17:22:09 +00:00
Antoine Pitrou
d5b34d4597
Issue #4969 : The mimetypes module now reads the MIME database from
...
the registry under Windows. Patch by Gabriel Genellina.
2009-11-15 14:10:48 +00:00
Mark Dickinson
009ae861f2
Avoid signed overflow in some xrange calculations, and extend
...
xrange tests to cover some special cases that caused problems
in py3k. This is a partial backport of r76292-76293 (see
issue #7298.)
2009-11-15 12:31:13 +00:00
Nick Coghlan
49868cb686
Issue #6816 : expose the zipfile and directory execution mechanism to Python code via the runpy module. Also consolidated some script execution functionality in the test harness into a helper module and removed some implementation details from the runpy module documentation.
2009-11-15 07:30:34 +00:00
R. David Murray
4653b8c2de
Remove 'g' from regrtest getopt argument string, since there's no
...
handler for it.
2009-11-15 00:07:00 +00:00
R. David Murray
da82689daa
Issue 7324: add a sanity check to regrtest argument parsing to
...
catch the case of an option with no handler.
2009-11-15 00:04:32 +00:00
R. David Murray
7f7eea651f
Issue #7312 (new feature): Add a -F flag to run the selected tests in
...
a loop until a test fails. Can be combined with -j. Patch by Antoine
Pitrou.
2009-11-14 15:18:22 +00:00
Benjamin Peterson
e36199b49d
fix several compile() issues by translating newlines in the tokenizer
2009-11-12 23:39:44 +00:00
Antoine Pitrou
310c9fec1a
Issue #7295 : Do not use a hardcoded file name in test_tarfile.
2009-11-11 20:55:07 +00:00
Antoine Pitrou
0734c632d5
Issue #7197 : Allow unittest.TextTestRunner objects to be pickled and
...
unpickled. This fixes crashes under Windows when trying to run
test_multiprocessing in verbose mode.
Additionally, Test_TextTestRunner hadn't been enabled in test_unittest.
2009-11-10 20:49:30 +00:00
Mark Dickinson
c579b35740
Add extra information to a test_signal failure message to aid diagnosis of buildbot failure.
2009-11-09 19:54:51 +00:00
Mark Dickinson
a8fd66d6aa
Issue #7251 : Break out round tests for large values into a separate
...
test function, and skip that test on Linux/alpha systems with a broken
system round function.
This should turn the Debian/alpha buildbot green.
2009-11-09 17:03:34 +00:00
Antoine Pitrou
d7158d4c62
Issue #7282 : Fix a memory leak when an RLock was used in a thread other
...
than those started through `threading.Thread` (for example, using
`thread.start_new_thread()`.
2009-11-09 16:00:11 +00:00
Antoine Pitrou
002533013f
Kill a small potential leak in test_threading.
...
The leak may not manifest itself if the OS re-uses the same thread ids
(I suppose Neal's machine doesn't :-))
2009-11-08 00:24:12 +00:00
Nick Coghlan
2733d88dc2
Add test for runpy.run_module package execution and use something other than logging as the example of a non-executable package
2009-11-07 08:13:55 +00:00
Antoine Pitrou
c98efe0500
Issue #7270 : Add some dedicated unit tests for multi-thread synchronization
...
primitives such as Lock, RLock, Condition, Event and Semaphore.
2009-11-06 22:34:35 +00:00
Antoine Pitrou
323b9da16d
Issue #7211 : Allow 64-bit values for the `ident` and `data` fields of kevent
...
objects on 64-bit systems. Patch by Michael Broghton.
I will revert this checkin if it causes problems on our BSD buildbots.
2009-11-04 19:25:14 +00:00
Antoine Pitrou
4ac6b93c00
Make test_shutil clean up after itself
2009-11-04 00:50:26 +00:00
Antoine Pitrou
b3c169b08f
Try to make test_wsgiref less fragile against environment changes by other tests
2009-11-03 16:41:20 +00:00
Antoine Pitrou
c6714bd1df
Add acceptance of long ints to test_memoryio.py
...
(in preparation for fix of #7249 in 2.6)
2009-11-02 20:47:33 +00:00
Benjamin Peterson
28e463d131
enable test_parser in lib2to3
2009-11-02 18:24:57 +00:00
Benjamin Peterson
aed6c4556c
add space
2009-11-02 18:16:36 +00:00
Antoine Pitrou
d8b16ab288
Fix and improve some assertions in test_site
2009-11-01 23:54:20 +00:00
Antoine Pitrou
84ee9e257e
Use a custom timeout in test_support.open_urlresource.
2009-11-01 22:02:03 +00:00
Antoine Pitrou
e4c6b16b37
This should finally fix #6896 . Let's watch the buildbots.
2009-11-01 21:29:33 +00:00
Antoine Pitrou
8844153d7f
test_normalization should skip and not crash when the resource isn't available
2009-11-01 21:26:14 +00:00
Raymond Hettinger
fa7dadd339
Fix exception handling in itertools.izip_longest().
2009-11-01 20:45:16 +00:00
Antoine Pitrou
235d942391
Hum, test skipping when the URL isn't reachable hadn't been applied to trunk.
2009-11-01 16:10:47 +00:00
Antoine Pitrou
0da5cb8db6
Use richer assertions in test_mailbox (for better failure messages).
2009-10-31 23:19:52 +00:00
Eric Smith
0b9e3a5423
Improved test for a deprecation warning.
2009-10-31 17:07:17 +00:00
Mark Dickinson
4b841d9156
Issue #7042 : Use a better mechanism for testing timers in test_signal.
2009-10-31 10:36:06 +00:00
Benjamin Peterson
b2e31a1c63
add some checks for evaluation order with parenthesis #7210
2009-10-31 03:56:15 +00:00
Antoine Pitrou
161df94b0d
Try to fix transient refleaks in test_pydoc.
2009-10-30 21:41:22 +00:00
Antoine Pitrou
3c96858480
Try to fix transient refleaks in test_xmlrpc.
2009-10-30 17:56:00 +00:00
Antoine Pitrou
643e85df48
Try to fix transient refleaks in test_asynchat.
2009-10-30 17:55:21 +00:00
Antoine Pitrou
61d5f6ff79
Fix transient refleaks in test_docxmlrpc.
2009-10-30 17:33:28 +00:00
Antoine Pitrou
59c44f36e0
Issue #7222 : Make thread "reaping" more reliable so that reference
...
leak-chasing test runs give sensible results. The previous method of
reaping threads could return successfully while some Thread objects were
still referenced. This also introduces a new private function:
:func:hread._count().
2009-10-30 17:07:08 +00:00
Georg Brandl
93c2171494
Fix constant name.
2009-10-29 21:44:56 +00:00
Georg Brandl
4045e88b8b
Use constants instead of magic integers for test result. Do not re-run with --verbose3 for environment changing tests.
2009-10-29 20:53:00 +00:00
Mark Dickinson
6f3900163a
Issue #7233 : Fix Decimal.shift and Decimal.rotate methods for
...
arguments with more digits than the current context precision.
Bug reported by Stefan Krah.
2009-10-29 12:11:18 +00:00
Mark Dickinson
0c67312c5c
Issue #7233 : A number of two-argument Decimal methods were failing to
...
accept ints and longs for the second argument.
2009-10-29 12:04:00 +00:00
Mark Dickinson
783b877555
Fix duplicate test numbers in extra.decTest
2009-10-29 11:09:09 +00:00
Benjamin Peterson
ea0e3b0d60
do a backport of r75928
...
The added test does not fail without the patch, but we still fix the issue of
surrogates being used in wide builds where they should not be.
2009-10-29 01:49:07 +00:00
R. David Murray
d913864efa
Remove variable that is no longer used.
2009-10-28 14:03:43 +00:00
Georg Brandl
4e1be94bc6
Make sure every run of test_intern() interns a new string, otherwise that test fails e.g. when some other test in test_builtin fails and it is rerun in verbose mode.
2009-10-27 22:56:09 +00:00
Mark Dickinson
53e9fa4eed
Test long inputs to float
2009-10-27 22:09:33 +00:00
Antoine Pitrou
8aea050911
Reduce the probability of refleaks in test_socketserver.
...
Not completely suppressed though, see issue #7222 .
2009-10-27 21:27:24 +00:00
Tarek Ziadé
d24cab8c74
Issue #7218 : Fix test_site for win32
2009-10-27 21:20:27 +00:00
Benjamin Peterson
26a93c0082
test expect base classes
2009-10-27 20:59:18 +00:00
Georg Brandl
8319170abb
Reformat the regrtest command-line option help and group the options into sections.
2009-10-27 20:55:44 +00:00
Georg Brandl
71a015ac1c
Add a regrtest option to re-run in verbose mode immediately after a test fails, and use that option on the buildbots.
2009-10-27 20:52:02 +00:00
Antoine Pitrou
cb170100d4
Try to fix transient refleaks in test_distutils.
2009-10-27 20:20:41 +00:00
Antoine Pitrou
fce3207b53
Fix transient refleaks in test_urllib2_localnet.
2009-10-27 20:14:04 +00:00
Antoine Pitrou
bb0bb30acc
Suppress transient refleaks in test_threading.
2009-10-27 20:02:23 +00:00
Antoine Pitrou
a763c06357
Suppress transient refleaks in test_smtplib.
2009-10-27 19:47:30 +00:00
Antoine Pitrou
0df2c73d6c
Suppress transient refleaks in test_file2k.
2009-10-27 19:36:44 +00:00
Antoine Pitrou
e171edc832
Fix transient refleak in test_sys.
2009-10-27 19:23:56 +00:00
Antoine Pitrou
85bd5879b2
(Hopefully) suppress transient refleaks in test_httpservers.
2009-10-27 18:50:52 +00:00
Antoine Pitrou
f829d1f551
Suppress transient refleaks in test_asyncore
2009-10-27 18:36:47 +00:00
Antoine Pitrou
dd62966a5f
Issue #7205 : Fix a possible deadlock when using a BZ2File object from several threads at once.
2009-10-27 17:41:58 +00:00
Benjamin Peterson
7582ec36b2
use 'is' instead of id()
2009-10-26 22:51:16 +00:00
Mark Dickinson
c04c7c5b72
Issue #7117 : Use PyOS_string_to_double instead of PyOS_ascii_strtod in
...
complexobject.c. Also remove length restriction on unicode inputs to
the complex constructor.
2009-10-26 22:28:14 +00:00
Mark Dickinson
8568b19850
Issue #7117 : Use PyOS_string_to_double instead of PyOS_ascii_strtod in
...
floatobject.c. Also, remove limitation on length of unicode inputs to
float().
2009-10-26 21:11:20 +00:00
Mark Dickinson
828b39865a
Skip readline tests if readline module is not available.
2009-10-26 11:59:30 +00:00
Mark Dickinson
da8652d920
Issue #7117 (backport py3k float repr) continued:
...
Add sys.float_repr_style attribute ('short' if short float
repr is in used; 'legacy' otherwise).
2009-10-24 14:01:08 +00:00
Antoine Pitrou
f7820c1626
Manual py3k backport: [svn r74316] Issue #5449 : Fix io.BytesIO to not accept arbitrary keywords
2009-10-24 12:28:22 +00:00
Antoine Pitrou
fa94e80f3b
Manual py3k backport: [svn r74158] Issue #6218 : Make io.BytesIO and io.StringIO picklable.
2009-10-24 12:23:18 +00:00
Antoine Pitrou
f98a267be3
Manual py3k backport: [svn r74155] Issue #6242 : Fix deallocator of io.StringIO and io.BytesIO
2009-10-24 11:59:41 +00:00
Antoine Pitrou
b5cf8a059c
Issue #7194 : test_thread could try to release an unacquired mutex (and fail).
2009-10-23 18:32:15 +00:00
Antoine Pitrou
b119ca9df4
Fix Windows buildbot failure
2009-10-23 12:01:13 +00:00
Antoine Pitrou
9bd246bba9
Test wouldn't work in debug mode.
...
We probably need a function in test_support to handle this.
2009-10-20 21:59:25 +00:00
Antoine Pitrou
efb60c0ceb
Issue #1722344 : threading._shutdown() is now called in Py_Finalize(), which
...
fixes the problem of some exceptions being thrown at shutdown when the
interpreter is killed. Patch by Adam Olsen.
2009-10-20 21:29:37 +00:00
Mark Dickinson
a7a52ab7ee
Issue #7099 : Decimal.is_normal should return True for all nonzero
...
finite non-subnormal values, even those with exponent > Emax.
2009-10-20 13:33:03 +00:00
Antoine Pitrou
5ba84910ae
Issue #7133 : SSL objects now support the new buffer API.
...
This fixes the test_ssl failure.
2009-10-19 17:59:07 +00:00
R. David Murray
a24db67d47
Clarify error report message, and don't recommend running in verbose
...
mode for more information if we are already running in verbose mode.
2009-10-19 17:53:58 +00:00
R. David Murray
92a27b5206
Eliminate warning message that looks like an error message. When it was
...
added not finding Lib/test in the path indicated something was wrong,
but when running regtest using "python -m" Lib/test isn't typically in
the path, so this message is now more disturbing than it is helpful.
2009-10-19 16:28:24 +00:00
R. David Murray
d9f1944fc3
Only run test_curses when sys.__stdout__ is a tty. This eliminates the
...
last false positive when running regrtest with -j.
2009-10-19 16:01:28 +00:00
R. David Murray
282396f27a
Issue #7151 : regrtest would generate a JSON failure if there was output
...
to stderr during the test run and it happened to get emitted after the
worker thread emitted the result JSON. Now we capture stdout and stderr
separately, which avoids that problem. It also means that _all_ stderr
output is after all stdout output when we print the test results, but
that seems acceptable, since output ordering is not guaranteed anyway.
The patch also moves the emit of the test name into the output block
generated after the test completes. Otherwise test names and test
output/errors were mixed in the terminal display, making it difficult
to determine which test generated the output.
2009-10-18 21:12:37 +00:00
Antoine Pitrou
603acf99d0
Add a comment about unreachable code, and fix a typo
2009-10-18 18:37:11 +00:00
Antoine Pitrou
8a172b14a3
Add a test for same-thread asynchronous exceptions (see #1779233 ).
2009-10-18 18:22:04 +00:00
Nick Coghlan
53a9dc91d7
Restore sys.path in test_tk
2009-10-18 10:56:21 +00:00
Nick Coghlan
f317019c07
Silence a deprecation warning by using the appropriate replacement construct
2009-10-18 10:29:10 +00:00
Nick Coghlan
9039b83c53
Using CleanImport to revert a reload of the os module doesn't work due to function registrations in copy_reg. The perils of reloading modules even for tests...
2009-10-18 05:38:48 +00:00
Mark Dickinson
bfd2dc7479
Protect against attempts to replace PyNumber_Add with PyNumber_InPlaceAdd in builtin sum
2009-10-17 21:46:32 +00:00
Nick Coghlan
a0e0f9eda4
Don't replace sys.path in test_site
2009-10-17 16:19:51 +00:00
Nick Coghlan
788d7667cb
Avoid replacing existing modules and sys.path in import tests
2009-10-17 15:57:42 +00:00
Nick Coghlan
8157e19e8f
Also check and restore identity of sys.path, sys.argv and os.environ rather than just their values (this picked up a few more misbehaving tests)
2009-10-17 15:48:16 +00:00
Nick Coghlan
fd4903bf05
Move restoration of the os.environ object into the context manager where it belongs
2009-10-17 15:45:52 +00:00
Nick Coghlan
87c03b3108
Revert changes made to environment in test_httpservers
2009-10-17 15:23:08 +00:00
Nick Coghlan
8c1ffeb614
Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
2009-10-17 15:09:41 +00:00
Nick Coghlan
7df72dcdf9
Restore original sys.path when running TTK tests
2009-10-17 14:40:54 +00:00
Nick Coghlan
b6edf193fb
Check and revert expected sys.path alterations
2009-10-17 08:21:21 +00:00
Nick Coghlan
a3e97ad5ba
Formatting tweak so that before and after values are vertically aligned
2009-10-17 07:34:27 +00:00
Nick Coghlan
2ee358eed3
Enhancement to the new environment checking code to print the changed items under -vv. Also includes a small tweak to allow underscores in the names of resources.
2009-10-17 07:30:40 +00:00
Mark Dickinson
59ca92093c
test_math ulp computation was wrong on big-endian systems
2009-10-17 07:06:37 +00:00
Nick Coghlan
0447cd6fdc
Correctly restore sys.stdout in test_descr
2009-10-17 06:33:05 +00:00
Mark Dickinson
08133af12e
Issue #7142 : Fix uses of unicode in memoryview objects
2009-10-15 15:53:58 +00:00
Benjamin Peterson
196b0925ca
only clear a module's __dict__ if the module is the only one with a reference to it #7140
2009-10-15 15:44:46 +00:00
Benjamin Peterson
96e319e5ac
don't need to mess up sys.path
2009-10-15 15:39:15 +00:00
Benjamin Peterson
c63457b18e
make inspect.isabstract() always return a boolean; add a test for it, too #7069
2009-10-15 03:06:55 +00:00
Benjamin Peterson
e52657220c
change test to what I intended
2009-10-15 01:56:25 +00:00
Benjamin Peterson
447dc15658
use floor division and add a test that exercises the tabsize codepath
2009-10-15 01:49:37 +00:00
Antoine Pitrou
b844ef7950
Silence py3k warning claiming to affect the random module
2009-10-14 18:56:11 +00:00
Antoine Pitrou
bb86314d22
Fix failures in test_profilehooks when run with -3
2009-10-14 18:47:13 +00:00
Antoine Pitrou
79d923b8c4
Silence some py3k warnings claiming to affect _pyio
2009-10-14 18:39:46 +00:00