broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'eligible':([x for x in d['visible'] if x not in d['disabled']]), 'select-union':(list(dict.fromkeys(d['selected']+[x for x in d['visible'] if x not in d['disabled']]))), 'clear-subset':([x for x in d['selected'] if x not in d['visible'] or x in d['disabled']]), 'all-visible':(bool([x for x in d['visible'] if x not in d['disabled']]) and all(x in d['selected'] for x in d['visible'] if x not in d['disabled'])), 'mixed-visible':(bool(d['selected'])), 'bulk-added-count':(sum(x not in d['selected'] and x not in d['disabled'] for x in d['visible']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0})], 2: [({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': []}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 3: [({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1})], 4: [({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 2}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0})], 5: [({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'eligible':([x for x in d['visible'] if x not in d['disabled']]), 'select-union':(list(dict.fromkeys(d['selected']+[x for x in d['visible'] if x not in d['disabled']]))), 'clear-subset':([x for x in d['selected'] if x not in d['visible'] or x in d['disabled']]), 'all-visible':(bool([x for x in d['visible'] if x not in d['disabled']]) and all(x in d['selected'] for x in d['visible'] if x not in d['disabled'])), 'mixed-visible':(0<len(d['selected'])<len(d['visible'])), 'bulk-added-count':(sum(x not in d['selected'] and x not in d['disabled'] for x in d['visible']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0})], 2: [({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': []}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 3: [({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1})], 4: [({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 2}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0})], 5: [({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Mixed state measures eligible visible membership only is violated by the widget projection.

Bulk selection acts on eligible visible choices, preserves hidden selections and reports mixed state over the eligible visible subset only. This example checks: Mixed state measures eligible visible membership only.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'eligible':([x for x in d['visible'] if x not in d['disabled']]), 'select-union':(list(dict.fromkeys(d['selected']+[x for x in d['visible'] if x not in d['disabled']]))), 'clear-subset':([x for x in d['selected'] if x not in d['visible'] or x in d['disabled']]), 'all-visible':(bool([x for x in d['visible'] if x not in d['disabled']]) and all(x in d['selected'] for x in d['visible'] if x not in d['disabled'])), 'mixed-visible':(0<sum(x in d['selected'] for x in d['visible'] if x not in d['disabled'])<sum(x not in d['disabled'] for x in d['visible'])), 'bulk-added-count':(len(d['visible']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 2: [({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': []}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 3: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 4: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 2}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 5: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'eligible':([x for x in d['visible'] if x not in d['disabled']]), 'select-union':(list(dict.fromkeys(d['selected']+[x for x in d['visible'] if x not in d['disabled']]))), 'clear-subset':([x for x in d['selected'] if x not in d['visible'] or x in d['disabled']]), 'all-visible':(bool([x for x in d['visible'] if x not in d['disabled']]) and all(x in d['selected'] for x in d['visible'] if x not in d['disabled'])), 'mixed-visible':(0<sum(x in d['selected'] for x in d['visible'] if x not in d['disabled'])<sum(x not in d['disabled'] for x in d['visible'])), 'bulk-added-count':(sum(x not in d['selected'] for x in d['visible']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 2: [({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'b'], 'clear-subset': ['b'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': []}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 3: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 4: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': [], 'selected': ['a'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 2}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'z', 'b'], 'clear-subset': ['z'], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'z'], 'clear-subset': ['a', 'z'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})], 5: [({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': [], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': False, 'mixed-visible': True, 'bulk-added-count': 1}), ({'visible': ['a', 'b'], 'selected': ['a', 'z'], 'disabled': ['b']}, {'eligible': ['a'], 'select-union': ['a', 'z'], 'clear-subset': ['z'], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': []}, {'eligible': ['a', 'b'], 'select-union': ['a', 'b'], 'clear-subset': [], 'all-visible': True, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': ['a', 'b'], 'selected': ['a', 'b'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a', 'b'], 'clear-subset': ['a', 'b'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': [], 'disabled': ['b']}, {'eligible': [], 'select-union': [], 'clear-subset': [], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': []}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0}), ({'visible': [], 'selected': ['a'], 'disabled': ['a', 'b']}, {'eligible': [], 'select-union': ['a'], 'clear-subset': ['a'], 'all-visible': False, 'mixed-visible': False, 'bulk-added-count': 0})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Bulk-change counts report newly added eligible choices is violated by the widget projection.

Bulk selection acts on eligible visible choices, preserves hidden selections and reports mixed state over the eligible visible subset only. This example checks: Bulk-change counts report newly added eligible choices.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'active-projection':(d['operand']), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(not d['enabled']), 'invalid-active':(d['enabled'] and not d['valid'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'active-projection':(d['operand'] if d['enabled'] and not d['locked'] else None), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(not d['enabled']), 'invalid-active':(d['enabled'] and not d['valid'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Disabled criteria do not enter active query payloads is violated by the widget projection.

A disabled filter criterion remains editable and serialized in saved configuration but is omitted from the active query projection; locked criteria differ from disabled ones. This example checks: Disabled criteria do not enter active query payloads.

split: open-access