def test_basic(): d = parse_pla(BASIC) assert d == { 'ninputs': 4, 'noutputs': 2, 'input_labels': ['x', 'y', 'z'], 'output_labels': ['f', 'g'], 'intype': FTYPE | RTYPE, 'cover': { ((1, 1, 1, 2), (0, 0)), ((1, 1, 2, 1), (0, 1)), ((1, 2, 1, 1), (1, 0)), ((2, 1, 1, 1), (1, 1)) }, }
def _do_espresso(fname): fpath = os.path.join('extension', 'espresso', 'test', 'bb_all', fname) with open(fpath) as fin: pla = parse_pla(fin.read()) return espresso.espresso(pla['ninputs'], pla['noutputs'], pla['cover'], intype=pla['intype'])