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
Antoine Pitrou
e22997ec7c
Silence a py3k warning claiming to affect Lib/calendar.py
2009-10-14 18:09:45 +00:00
Antoine Pitrou
868817eaf5
Fix a test_atexit failure when run with -3
2009-10-14 17:34:31 +00:00
R. David Murray
14dcd43d0b
Enhanced Issue 7058 patch, which will not be backported. Refactors the
...
code, adds checks for stdin/out/err, cwd, and sys.path, and adds a new
section in the summary for tests that modify the environment (thanks to
Ezio Melotti for that suggestion).
2009-10-14 13:58:07 +00:00
Senthil Kumaran
274686631a
Fixed Issue6894, urllib2 doesn't respect "no_proxy" environment
2009-10-11 02:00:07 +00:00
Antoine Pitrou
58d2f2689a
Issue #7055 : test___all__ now greedily detects all modules which have an
...
__all__ attribute, rather than using a hardcoded and incomplete list.
2009-10-10 20:52:11 +00:00
Mark Dickinson
539bff4234
Update decimal test data to the most recent set from Mike Cowlishaw.
2009-10-08 16:28:39 +00:00
Amaury Forgeot d'Arc
d0052d17b1
#1571184 : makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,
...
_PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace.
It now also parses the Unihan.txt for numeric values.
2009-10-06 19:56:32 +00:00
R. David Murray
abe3d3ec85
Issue #7058 : Added save/restore for argv and os.environ to runtest_inner
...
in regrtest, with warnings if the called test modifies them.
2009-10-05 17:03:09 +00:00
Mark Dickinson
245d915e3e
Issue #7042 : Fix test_signal failure on OS X 10.6 64-bit builds
...
(and also, with luck, on the x86 FreeBSD buildbot), by making sure
that some user time is used in test_itimer_virtual.
2009-10-04 18:38:39 +00:00
Benjamin Peterson
82d31e9b20
test logging
2009-10-04 13:38:38 +00:00
Benjamin Peterson
7adbb5a35d
#7050 fix a SystemError when using tuple unpacking and augmented assignment
2009-10-03 20:23:24 +00:00
Georg Brandl
f895cf5d33
#7031 : Add TestCase.assertIsInstance and negated method.
2009-10-01 20:59:31 +00:00
Senthil Kumaran
dc61ec35ec
That's self.env.unset(k) and not env.unset(k) I was heading back to the problem.
2009-10-01 01:50:13 +00:00
Senthil Kumaran
5a43e86542
using dict.unset(k) instead of del dict[k]. consistent with release26-maint
2009-10-01 01:19:18 +00:00
Senthil Kumaran
91abd6e68d
Fix for issue7026 test_urllib: unsetting missing 'env' variable.
2009-10-01 01:07:03 +00:00
Mark Dickinson
8ca7482cc9
Fix buggy accuracy test
2009-09-30 16:58:01 +00:00
Philip Jenvey
8b9020458a
#5329 : fix os.popen* regression from 2.5: don't execute commands as a sequence
...
through the shell. also document the correct subprocess replacement for this
case
patch from Jean-Paul Calderone and Jani Hakala
2009-09-29 19:10:15 +00:00
Mark Dickinson
7e7a3ec901
Issue #7019 : Unmarshalling of bad long data could produce unnormalized
...
PyLongs. Raise ValueError instead.
2009-09-29 19:01:06 +00:00
Antoine Pitrou
7248178cd9
Issue #6790 : Make it possible again to pass an `array.array` to
...
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
2009-09-29 17:48:18 +00:00
Philip Jenvey
dbf3b258e7
#6990 : clear threading.local's key only after its thread state is removed:
...
fixes local subclasses leaving old state around after a ref cycle GC which
could be recycled by new locals
2009-09-29 04:32:44 +00:00
Mark Dickinson
b93fff0a57
Issue #3366 : Add gamma function to math module.
...
(lgamma, erf and erfc to follow).
2009-09-28 18:54:55 +00:00
R. David Murray
97f5ff37ff
Prevent test_bad_address failure when a domain in the dns search
...
path implements a '*' default rule. Also update comment with
a more complete explanation of the difficulties inherent in
the test.
2009-09-28 16:57:45 +00:00
Skip Montanaro
b4fd4d37a1
Patch from Thomas Barr so that csv.Sniffer will set doublequote property.
...
Closes issue 6606.
2009-09-28 02:12:27 +00:00
Ezio Melotti
9aac2455ab
#7000 : document "sep" in capwords. Add a few tests
2009-09-26 11:20:53 +00:00
Andrew M. Kuchling
b49e53ee16
#6243 : fix segfault when keyname() returns a NULL pointer.
...
Bug noted by Trundle, patched by Trundle and Jerry Chen.
2009-09-25 22:23:54 +00:00
Kristján Valur Jónsson
2fcd03bb77
http://bugs.python.org/issue6971
...
Adding the SIO_KEEPALIVE_VALS command to socket.ioctl on windows
2009-09-25 15:19:51 +00:00
Brett Cannon
4d94743c28
When range checking was added to time.strftime() a check was placed on tm_isdst
...
to make sure it fell within [-1, 1] just in case someone implementing
strftime() in libc was stupid enough to assume this. Turns out, though, some
OSs (e.g. zOS) are stupid enough to use values outside of this range for time
structs created by the system itself. So instead of throwing a ValueError,
tm_isdst is now normalized before being passed to strftime().
Fixes issue #6823 . Thanks Robert Shapiro for diagnosing the problem and
contributing an initial patch.
2009-09-22 00:29:48 +00:00
Ronald Oussoren
9f20d9d0ee
Issue 6877: this patch makes it possible to link the readline extension
...
to the libedit emulation of the readline API on OSX 10.5 or later.
This also adds a minimal testsuite for readline to check that the
history manipuation functions have the same interface with both
C libraries.
2009-09-20 14:18:15 +00:00