with open("data/sppl/merged.json","r") as datafile: #gender test data set
data = datafile.read()
spn = spn_from_dict(json.loads(data))
psn = spn.children[0]
psn2= psn.constrain({'gender' : "female"})
assert psn.prob(Identity('height') > 180) == psn2.prob(Identity('height') > 180)
(This should fail, either because Identity is missing from the constrain, or because constraining should change the probability. But instead it succeeds.)