IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29228


Ignore:
Timestamp:
Sep 23, 2010, 3:46:01 PM (16 years ago)
Author:
Serge CHASTEL
Message:

Fixed unit tests

Location:
branches/sc_branches/psps_testing
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/sc_branches/psps_testing/testers/batch_file.py

    r29227 r29228  
    2525      of the files contained in the archive
    2626
    27     >>> print BatchFileTester("data/psut/ok/B00000010.tar.gz").test()
    28     PSDC-940-006-01, 3.4.1: OK
    29     PSDC-940-006-01, 3.4: OK
    30     PSDC-940-006-01, 3.5.1.2: OK
    31     PSDC-940-006-01, 3.5.1.1: OK
    32     PSDC-940-006-01, 3.5.1 (file attributes/name): OK
    33     PSDC-940-006-01, 3.5.1 (file attributes/size): OK
    34     PSDC-940-006-01, 3.5.1 (file attributes/MD5 checksum of file): OK
    35     BARF
     27    >>> print BatchFileTester("data/psut/ok/B00000010.tar.gz").test().success
     28    True
    3629    """
    3730    def __init__(self, filename):
  • branches/sc_branches/psps_testing/testers/fits/p2.py

    r29227 r29228  
    6666        nOTA = product.nOTA
    6767        if len(self.fits) != 4*nOTA + 2:
    68             report.write('\nInvalid number of OTA: from FITS file: %d / from FrameMeta %d'
    69                          % (len(self.fits)-2/4, nOTA))
    70             return (report.getvalue(), None)
     68            TestReport.ko('Invalid number of OTA: from FITS file: %d / from FrameMeta %d'
     69                          % (len(self.fits)-2/4, nOTA),
     70                          {'requirement': 'TBD'})
     71            return TestProduct()
    7172        for ota_index in range(nOTA):
    7273            PsPsLogger.debug('  Testing P2FitsTester object: OTA (%d/%d)'
    7374                               % ((ota_index+1), nOTA))
    74             (messages, values) = self.test_detections_frames(frameID, ota_index,
    75                                                              be_tolerant_for_types)
    76             PsPsLogger.debug(messages)
    77             report.write('\n' + messages)
    78         return (report.getvalue(), None)
     75            subproduct = self.test_detections_frames(frameID, ota_index,
     76                                                     be_tolerant_for_types)
     77            if subproduct.success:
     78                TestReport.ok(requirement)
     79            product.success = product.success and subproduct.success
     80        return product
    7981
    8082    #####################################################
Note: See TracChangeset for help on using the changeset viewer.