Table of Contents

Class: RecordChecker ./src/peak/ddt/processors.py

Verify that table contents match a computed recordset

The records may be supplied via the records constructor keyword, or by defining a binding for records in a subclass. Records must be instances of self.targetClass, but by default the targetClass is taken from the class of the first item in records, if any.

The checker will compare the contents of the supplied table with the list of records, mark missing rows, add extra rows, and compare cells of matching rows automatically.

Base Classes   
ModelChecker
Methods   
compare
compareRow
mappers
processRows
tearDown
  compare 
compare (
        self,
        rows,
        data,
        column=0,
        )

Compare rows and data beginning at column -> missing,extra

Return value is a tuple (missingRows,extraRecords) containing the rows not found in data, and the data not present in rows, respectively. This works by successively partitioning the data on each column from left to right, until either one of rows or data is empty, or both contain only a single item. (In the latter case, the items are compared field-by-field, with the differences marked.)

  compareRow 
compareRow (
        self,
        row,
        record,
        )

Compare a single row against a single record, marking results

  mappers 
mappers ( self )

List of ICellMapper objects corresponding to table columns

  processRows 
processRows ( self,  rows )

Compare contents against generated data

  tearDown 
tearDown ( self )

Perform any post-comparison cleanup


Table of Contents

This document was automatically generated on Mon May 13 01:11:05 2024 by HappyDoc version 2.1