[Python-checkins] python/dist/src/Lib/test test_decimal.py, NONE, 1.1 regrtest.py, 1.153, 1.154

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Thu Jul 1 07:02:05 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26988/Lib/test

Modified Files:
	regrtest.py 
Added Files:
	test_decimal.py 
Log Message:
Move Decimal from the sandbox into production.



--- NEW FILE: test_decimal.py ---
# Copyright (c) 2004 Python Software Foundation.
# All rights reserved.

# Written by Eric Price <eprice at tjhsst.edu>
#    and Facundo Batista <facundo at taniquetil.com.ar>
#    and Raymond Hettinger <python at rcn.com>
#    and Aahz (aahz at pobox.com)
#    and Tim Peters

"""
These are the test cases for the Decimal module.

There are two groups of tests, Arithmetic and Behaviour. The former test
the Decimal arithmetic using the tests provided by Mike Cowlishaw. The latter
test the pythonic behaviour according to PEP 327.

Cowlishaw's tests can be downloaded from:

   www2.hursley.ibm.com/decimal/dectest.zip
[...1043 lines suppressed...]

    if arith or is_resource_enabled('decimal'):
        test_classes.extend([DecimalTest])

    run_unittest(*test_classes)
    import decimal as DecimalModule
    run_doctest(DecimalModule, verbose)
    return


if __name__ == '__main__':
    # Calling with no arguments runs all tests.
    # Calling with "Skip" will skipover the arithmetic tests.
    if len(sys.argv) == 1:
        test_main(arith=True, verbose=True)
    elif len(sys.argv) == 2:
        arith = sys.argv[1].lower() != 'skip'
        test_main(arith=arith, verbose=True)
    else:
        raise ValueError("test called with wrong arguments, use test_Decimal [Skip]")

Index: regrtest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** regrtest.py	6 Jun 2004 15:53:18 -0000	1.153
--- regrtest.py	1 Jul 2004 11:01:31 -0000	1.154
***************
*** 72,75 ****
--- 72,78 ----
                  a long time to complete.
  
+     decimal -   Test the decimal module against a large suite that
+                 verifies compliance with standards.
+ 
  To enable all resources except one, use '-uall,-<resource>'.  For
  example, to run all the tests except for the bsddb tests, give the
***************
*** 113,117 ****
  from test import test_support
  
! RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb')
  
  
--- 116,121 ----
  from test import test_support
  
! RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb',
!                   'decimal')
  
  




More information about the Python-checkins mailing list