Neal Norwitz
041ee5d373
Add a tiny sleep and additional flush to force the file to really be synced.
2008-01-27 17:10:50 +00:00
Raymond Hettinger
63c77b6175
Docstring nit
2008-01-27 10:13:57 +00:00
Jeffrey Yasskin
3e1a373616
Make rational.gcd() public and allow Rational to take decimal strings, per
...
Raymond's advice.
2008-01-27 05:40:35 +00:00
Neal Norwitz
46c61b2c1d
Try to prevent this test from being flaky. We might need a sleep in here
...
which isn't as bad as it sounds. The close() *should* raise an exception,
so if it didn't we should give more time to sync and really raise it.
Will backport.
2008-01-27 05:02:34 +00:00
Neal Norwitz
6e070814b2
Eliminate the sleeps that assume the server will start in .5 seconds.
...
This should make the test less flaky. It also speeds up the test
by about 75% on my box (20+ seconds -> ~4 seconds).
2008-01-27 01:44:05 +00:00
Neal Norwitz
3d785e2c6a
Consistently use tempfile.tempdir for the db_home directory.
2008-01-26 23:14:17 +00:00
Neal Norwitz
7f47d93f52
On some systems (e.g., Ubuntu on hppa) the flush()
...
doesn't cause the exception, but the close() does.
Will backport.
2008-01-26 23:13:46 +00:00
Neal Norwitz
37184295dc
Reduce the race condition by signalling when the server is ready
...
and not trying to connect before.
2008-01-26 21:21:59 +00:00
Neal Norwitz
a121508fac
Always try to remove the test file even if close raises an exception
2008-01-26 21:02:45 +00:00
Christian Heimes
a2af21262a
Unit test fix from Giampaolo Rodola, #1938
2008-01-26 16:43:35 +00:00
Georg Brandl
0cdf9a36ec
#1473257 : add generator.gi_code attribute that refers to
...
the original code object backing the generator. Patch by Collin Winter.
2008-01-26 14:14:20 +00:00
Georg Brandl
422319937e
Add missing things in re docstring.
2008-01-26 11:00:18 +00:00
Neal Norwitz
08b50eb3d3
The OS X buildbot had errors with the unavailable exceptions disabled. Restore it.
2008-01-26 08:26:00 +00:00
Neal Norwitz
960efe9c2d
Fix exception in tearDown on ppc buildbot. If there's no directory,
...
that shouldn't cause the test to fail. Just like it setUp.
2008-01-26 07:38:03 +00:00
Neal Norwitz
653272f0cf
Use a condition variable (threading.Event) rather than sleeps and checking a
...
global to determine when the server is ready to be used. This slows the test
down, but should make it correct. There was a race condition before where the
server could have assigned a port, yet it wasn't ready to serve requests. If
the client sent a request before the server was completely ready, it would get
an exception. There was machinery to try to handle this condition. All of
that should be unnecessary and removed if this change works. A NOTE was
added as a comment about what needs to be fixed.
The buildbots will tell us if there are more errors or
if this test is now stable.
2008-01-26 07:26:12 +00:00
Neal Norwitz
5be3067742
Prevent this test from failing if there are transient network problems
...
by retrying the host for up to 3 times.
2008-01-26 05:54:48 +00:00
Raymond Hettinger
3dbd4c536d
Changes 54857 and 54840 broke code and were reverted in Py2.5 just before
...
it was released, but that reversion never made it to the Py2.6 head.
2008-01-25 19:24:46 +00:00
Neal Norwitz
769d0eefd7
Make the test more robust by trying to reconnect up to 3 times
...
in case there were transient failures. This will hopefully silence
the buildbots for this test. As we find other tests that have a problem,
we can fix with a similar strategy assuming it is successful. It worked
on my box in a loop for 10+ runs where it would have an exception otherwise.
2008-01-25 06:37:23 +00:00
Raymond Hettinger
9ec7bc36fe
More design notes
2008-01-25 01:46:33 +00:00
Raymond Hettinger
9c6d81f5dd
Fix-up signature for approximation.
2008-01-25 01:23:38 +00:00
Raymond Hettinger
7ea82253ea
Add one other review comment.
2008-01-25 01:13:12 +00:00
Raymond Hettinger
921cb5d3a3
Mark todos and review comments.
2008-01-25 00:33:45 +00:00
Raymond Hettinger
a6216749fb
Add support for copy, deepcopy, and pickle.
2008-01-25 00:21:54 +00:00
Raymond Hettinger
909e334e8a
More code cleanup. Remove unnecessary indirection to useless class methods.
2008-01-24 23:50:26 +00:00
Amaury Forgeot d'Arc
16570f59ca
#1920 : when considering a block starting by "while 0", the compiler optimized the
...
whole construct away, even when an 'else' clause is present::
while 0:
print("no")
else:
print("yes")
did not generate any code at all.
Now the compiler emits the 'else' block, like it already does for 'if' statements.
Will backport.
2008-01-24 22:51:18 +00:00
Raymond Hettinger
5310b69419
Shorter pprint's for empty sets and frozensets. Fix indentation of frozensets. Add tests including two complex data structures.
2008-01-24 21:47:56 +00:00
Raymond Hettinger
6170874f9c
Expand tests to include nested graph structures.
2008-01-24 21:23:58 +00:00
Raymond Hettinger
5b0e27e50d
Add support for int(r) just like the other numeric classes.
2008-01-24 19:30:19 +00:00
Thomas Heller
5ca924038d
Invert the checks in get_[u]long and get_[u]longlong. The intent was
...
to not accept float types; the result was that integer-like objects
were not accepted.
Ported from release25-maint.
2008-01-24 19:15:02 +00:00
Raymond Hettinger
5a05364049
Add support for trunc().
2008-01-24 19:05:29 +00:00
Raymond Hettinger
70ec29d0f4
Revert 60189 and restore performance.
2008-01-24 18:12:23 +00:00
Raymond Hettinger
7a6eacd2ca
Clean-up and speed-up code by accessing numerator/denominator directly. There's no reason to enforce readonliness
2008-01-24 18:05:54 +00:00
Guido van Rossum
37edeab778
Fix test67.py from issue #1303614 .
2008-01-24 17:58:05 +00:00
Guido van Rossum
4e3f12486f
Fi debug turd -- a call accidentally left out.
2008-01-24 15:53:22 +00:00
Vinay Sajip
92aa2f8d6b
Added optional delay argument to FileHandler and subclasses.
2008-01-24 12:37:33 +00:00
Vinay Sajip
97ef165a1d
Added optional delay argument to FileHandler and subclasses.
2008-01-24 12:37:08 +00:00
Gregory P. Smith
7b7ce7854c
Fix issue1789: The tutorial contained a misuse of the struct module.
...
(also remove an unneeded import struct from test_largefile)
2008-01-24 09:38:26 +00:00
Neal Norwitz
7070094d7f
Fix the test_urllib2net failures that were caused by r58067.
...
I'm not sure this is the correct fix, but at least the test passes
now and should be closer to correct.
2008-01-24 07:40:51 +00:00
Neal Norwitz
bf839e2efa
Fix the tests by restoring __import__. I think the test is still valid.
2008-01-24 04:14:50 +00:00
Raymond Hettinger
f336c8b7e9
Cleanup
2008-01-24 02:05:06 +00:00
Raymond Hettinger
eb461904eb
Minor clean-up and more tests.
2008-01-24 02:00:25 +00:00
Raymond Hettinger
cf10926088
Add first-cut at an approximation function (still needs rounding tweaks). Add continued fraction conversions.
2008-01-24 00:54:21 +00:00
Guido van Rossum
9acc387bcf
Turn three recently fixed crashers into regular tests.
2008-01-23 23:23:43 +00:00
Kurt B. Kaiser
f30ba3dd66
There was an error on exit if no sys.exitfunc was defined. Issue 1647.
2008-01-23 22:55:26 +00:00
Kurt B. Kaiser
b4aaa76053
Could not open files in .idlerc directory if latter was hidden on Windows.
...
Issue 1743, Issue 1862.
2008-01-23 22:19:23 +00:00
Guido van Rossum
1d9a9eaa89
Fix two crashers.
2008-01-23 20:19:01 +00:00
Christian Heimes
082c9b0267
Fixed bug #1915 : Python compiles with --enable-unicode=no again. However several extension methods and modules do not work without unicode support.
2008-01-23 14:20:50 +00:00
Guido van Rossum
66b4ab701b
I'm tired of these tests breaking at Google due to our large number of
...
users and groups in LDAP/NIS. So I'm limiting the extra-heavy part of
the tests to passwd/group files with at most 1000 entries.
2008-01-23 01:18:27 +00:00
Raymond Hettinger
c226c31139
Let pprint() support sets and frozensets (suggested by David Mertz).
2008-01-23 00:04:40 +00:00
Gregory P. Smith
2230bcfe24
docstring and comment updates suggested by Giampaolo Rodola'
2008-01-22 23:15:34 +00:00