[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.113.4.2,1.113.4.3

Michael Hudson mwh@users.sourceforge.net
Tue, 05 Mar 2002 07:38:45 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv15943

Modified Files:
      Tag: release22-maint
	test_descr.py 
Log Message:
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.


Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.113.4.2
retrieving revision 1.113.4.3
diff -C2 -d -r1.113.4.2 -r1.113.4.3
*** test_descr.py	5 Mar 2002 15:37:18 -0000	1.113.4.2
--- test_descr.py	5 Mar 2002 15:38:43 -0000	1.113.4.3
***************
*** 1752,1755 ****
--- 1752,1756 ----
      a = longclone(-1)
      vereq(a.__dict__, {})
+     vereq(long(a), -1)  # verify PyNumber_Long() copies the sign bit
  
      class precfloat(float):