def test_can_set_and_query_direction_of_pin_when_open(self):
    with pins.pin(0) as pin:
        pin.direction = Out
        assert (pin.direction == Out)
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'out\n')
        pin.direction = In
        assert (pin.direction == In)
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'in\n')
def test_can_set_and_query_direction_of_pin_when_open(self):
    with pins.pin(0) as pin:
        pin.direction = Out
        assert (pin.direction == Out)
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'out\n')
        pin.direction = In
        assert (pin.direction == In)
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'in\n')