IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2010, 3:50:36 PM (16 years ago)
Author:
Serge CHASTEL
Message:

Improved unit tests/code coverage. Some refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sc_branches/psps_testing/utilities/util.py

    r29227 r29235  
    2121    True
    2222    >>> equal(a, b, 1.e-16)
     23    False
     24    >>> class Dummy:
     25    ...   def __init__(self):
     26    ...     pass
     27    >>> dummy1 = Dummy()
     28    >>> dummy2 = Dummy()
     29    >>> equal(dummy1, dummy2)
    2330    False
    2431    """
     
    8491    >>> answer2['items'][0]['sky2'] = 1792.054
    8592    >>> product = match(fits2, answer2, 'Req: ')
     93    >>> print product.success
     94    False
     95
     96    >>> fits2._fields['sky2'] = [1792.05]
     97    >>> answer2['items'][0]['sky2'] = 1792.054
     98    >>> product = match(fits2, answer2, 'Req: ', max_failures = -1)
    8699    >>> print product.success
    87100    False
     
    179192    ...
    180193    Exception: Type 'UnsupportedType' is not supported
     194    >>> print psi_convert('Byte', 128)
     195    -128
     196    >>> print psi_convert('Byte', 255)
     197    -1
    181198    """
    182199    # PsPsLogger.debug('Value class: %s (%s/%s)'
     
    215232    current_argument_position = 1
    216233    while current_argument_position < len(sys.argv):
    217         if sys.argv[current_argument_position] == '-v':
     234        if sys.argv[current_argument_position] == '-debug': #pragma: no cover
    218235            PsPsLogger.set_stderr()
    219236            current_argument_position += 1
Note: See TracChangeset for help on using the changeset viewer.