def test_callback_wrapper_not_none(): called = [] def cb(pin): called.append(pin) callback = GPIO.__wrap(cb, 17) callback(97) assert 17 in called assert 97 not in called
def test_callback_wrapper_none(): assert GPIO.__wrap(None, 12) is None