diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-02-03 02:43:37 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-02-03 02:43:37 (GMT) |
commit | 23b9ef720559f31eaac3b5680b283f6693fd83ad (patch) | |
tree | 0f7b0c18e46b62179d0933e6eb65b86b6010957d /Lib/test | |
parent | 93fc46f3f46b072d2ee53c223f7c34b97425d393 (diff) | |
download | cpython-23b9ef720559f31eaac3b5680b283f6693fd83ad.zip cpython-23b9ef720559f31eaac3b5680b283f6693fd83ad.tar.gz cpython-23b9ef720559f31eaac3b5680b283f6693fd83ad.tar.bz2 |
Merged revisions 77937 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77937 | benjamin.peterson | 2010-02-02 20:35:45 -0600 (Tue, 02 Feb 2010) | 75 lines
Merged revisions 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines
Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done
partially before. Also add a comment describing how this might have to work
with different versions of the interpreter.
........
r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line
Fixed typo
........
r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line
#7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such.
........
r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line
Add note about usage of STRINGLIB_EMPTY.
........
r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line
Fix internal reference.
........
r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines
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.
........
r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines
Do not compile stubs for the sha2 series hashes in the openssl hashlib
module when the openssl version is too old to support them. That
leads both compiled code bloat and to unittests attempting to test
implementations that don't exist for comparison purposes on such
platforms.
........
r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line
Add two more test_strtod test values.
........
r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line
#7762: fix refcount annotation of PyUnicode_Tailmatch().
........
r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line
#7725: fix referencing issue.
........
r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line
mention from_float() in error message
........
r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line
#7802: fix invalid example (heh).
........
r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines
Fix-up ftplib documentation:
move exception descriptions to toplevel, not inside a class
remove attribution in "versionadded"
spell and grammar check docstring of FTP_TLS
........
r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line
Minor modification to unittest documentation.
........
................
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_descr.py | 20 | ||||
-rw-r--r-- | Lib/test/test_strtod.py | 36 |
2 files changed, 56 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index a02fe39..82dcc2c 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4159,6 +4159,26 @@ order (MRO) for bases """ c[1:2] = 3 self.assertEqual(c.value, 3) + def test_set_and_no_get(self): + # See + # http://mail.python.org/pipermail/python-dev/2010-January/095637.html + class Descr(object): + + def __init__(self, name): + self.name = name + + def __set__(self, obj, value): + obj.__dict__[self.name] = value + descr = Descr("a") + + class X(object): + a = descr + + x = X() + self.assertIs(x.a, descr) + x.a = 42 + self.assertEqual(x.a, 42) + def test_getattr_hooks(self): # issue 4230 diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index 13b008b..ab8a7cd 100644 --- a/Lib/test/test_strtod.py +++ b/Lib/test/test_strtod.py @@ -313,6 +313,42 @@ class StrtodTests(unittest.TestCase): '4106250198039490000000000000000000000000000000000000000e-38', # issue 7632 bug 8: the following produced 10.0 '10.900000000000000012345678912345678912345', + + # two humongous values from issue 7743 + '116512874940594195638617907092569881519034793229385' #... + '228569165191541890846564669771714896916084883987920' #... + '473321268100296857636200926065340769682863349205363' #... + '349247637660671783209907949273683040397979984107806' #... + '461822693332712828397617946036239581632976585100633' #... + '520260770761060725403904123144384571612073732754774' #... + '588211944406465572591022081973828448927338602556287' #... + '851831745419397433012491884869454462440536895047499' #... + '436551974649731917170099387762871020403582994193439' #... + '761933412166821484015883631622539314203799034497982' #... + '130038741741727907429575673302461380386596501187482' #... + '006257527709842179336488381672818798450229339123527' #... + '858844448336815912020452294624916993546388956561522' #... + '161875352572590420823607478788399460162228308693742' #... + '05287663441403533948204085390898399055004119873046875e-1075', + + '525440653352955266109661060358202819561258984964913' #... + '892256527849758956045218257059713765874251436193619' #... + '443248205998870001633865657517447355992225852945912' #... + '016668660000210283807209850662224417504752264995360' #... + '631512007753855801075373057632157738752800840302596' #... + '237050247910530538250008682272783660778181628040733' #... + '653121492436408812668023478001208529190359254322340' #... + '397575185248844788515410722958784640926528544043090' #... + '115352513640884988017342469275006999104519620946430' #... + '818767147966495485406577703972687838176778993472989' #... + '561959000047036638938396333146685137903018376496408' #... + '319705333868476925297317136513970189073693314710318' #... + '991252811050501448326875232850600451776091303043715' #... + '157191292827614046876950225714743118291034780466325' #... + '085141343734564915193426994587206432697337118211527' #... + '278968731294639353354774788602467795167875117481660' #... + '4738791256853675690543663283782215866825e-1180', + # exercise exit conditions in bigcomp comparison loop '2602129298404963083833853479113577253105939995688e2', '260212929840496308383385347911357725310593999568896e0', |