Update of /cvsroot/webware/Webware/MiscUtils/Testing
In directory sc8-pr-cvs1:/tmp/cvs-serv802/Testing
Modified Files:
TestFuncs.py
Log Message:
- fixed a bug in commas() regarding negative numbers
Index: TestFuncs.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiscUtils/Testing/TestFuncs.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TestFuncs.py 10 Dec 2002 09:06:11 -0000 1.8
--- TestFuncs.py 29 Dec 2002 01:47:58 -0000 1.9
***************
*** 18,21 ****
--- 18,26 ----
1.15 '1.15'
12345.127 '12,345.127'
+ -1 '-1'
+ -11 '-11'
+ -111 '-111'
+ -1111 '-1,111'
+ -11111 '-11,111'
'''
tests = string.split(testSpec)
***************
*** 26,35 ****
result = eval(tests[i+1])
#print '%r yields %r' % (source, result)
! assert commas(source)==result
# Now try the source as a string instead of a number:
source = eval("'%s'" % tests[i])
#print '%r yields %r' % (source, result)
! assert commas(source)==result
i = i+2
--- 31,40 ----
result = eval(tests[i+1])
#print '%r yields %r' % (source, result)
! assert commas(source)==result, '%r %r' % (commas(source), result)
# Now try the source as a string instead of a number:
source = eval("'%s'" % tests[i])
#print '%r yields %r' % (source, result)
! assert commas(source)==result, '%r %r' % (commas(source), result)
i = i+2
|