def test_can_set_direction_on_construction(self):
    pin = pins.pin(0, Out)
    assert (pin.direction == Out)
    assert (not os.path.exists('/sys/class/gpio/gpio17/direction'))
    with pin:
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'out\n')
        assert (pin.direction == Out)
def test_can_set_direction_on_construction(self):
    pin = pins.pin(0, Out)
    assert (pin.direction == Out)
    assert (not os.path.exists('/sys/class/gpio/gpio17/direction'))
    with pin:
        assert (content_of('/sys/class/gpio/gpio17/direction') == 'out\n')
        assert (pin.direction == Out)