I think it would be be clearer this comment was replaced by a a new test function instead, for instance `test_proba_dict`. Same remark applies for the other logical blocks of this long test function. Just put the `y` as a global variable of the test module.