def test_setting_value_of_output_pin_writes_to_device_file(self):
    with pins.pin(0) as pin:
        pin.direction = Out
        pin.value = 1
        assert (pin.value == 1)
        assert (content_of('/sys/class/gpio/gpio17/value') == '1\n')
        pin.value = 0
        assert (pin.value == 0)
        assert (content_of('/sys/class/gpio/gpio17/value') == '0\n')
def test_setting_value_of_output_pin_writes_to_device_file(self):
    with pins.pin(0) as pin:
        pin.direction = Out
        pin.value = 1
        assert (pin.value == 1)
        assert (content_of('/sys/class/gpio/gpio17/value') == '1\n')
        pin.value = 0
        assert (pin.value == 0)
        assert (content_of('/sys/class/gpio/gpio17/value') == '0\n')