Esempio n. 1
0
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
Esempio n. 2
0
def test_callback_wrapper_none():
    assert GPIO.__wrap(None, 12) is None