From: Michael W. Hudson Date: Tue, 5 Mar 2002 15:38:43 +0000 (+0000) Subject: backport tim_one's checkin of X-Git-Tag: v2.2.1c1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7894ba15806f5053b6a9aba1a5a50630ee52215;p=thirdparty%2FPython%2Fcpython.git backport tim_one's checkin of revision 1.116 of test_descr.py _PyLong_Copy(): was creating a copy of the absolute value, but should copy the sign too. Added a test to test_descr to ensure that it does. Bugfix candidate. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index e667efb18af7..de9bba163660 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1751,6 +1751,7 @@ def inherits(): # Check that negative clones don't segfault a = longclone(-1) vereq(a.__dict__, {}) + vereq(long(a), -1) # verify PyNumber_Long() copies the sign bit class precfloat(float): __slots__ = ['prec']