def test_connect(dome): assert not dome.is_connected assert dome.connect() is True assert dome.is_connected is True # Can repeat. assert dome.connect() is True assert dome.is_connected is True
def test_open_and_close_slit(dome): dome.connect() assert dome.open() is True assert 'open' in dome.status.lower() assert dome.is_open is True assert dome.close() is True assert 'closed' in dome.status.lower() assert dome.is_closed is True assert dome.disconnect() is True
def test_open_and_close_slit(dome): dome.connect() assert dome.open() is True assert dome.status == 'Both sides open' assert dome.is_open is True assert dome.close() is True assert dome.status == 'Both sides closed' assert dome.is_closed is True dome.disconnect()
def test_disconnect(dome): assert dome.connect() is True assert dome.disconnect() is True assert dome.is_connected is False # Can repeat. assert dome.disconnect() is True assert dome.is_connected is False
def test_connect_and_disconnect(dome): # We use rs232.SerialData, which automatically connects. assert dome.is_connected is True dome.disconnect() assert dome.is_connected is False assert dome.connect() is True assert dome.is_connected is True dome.disconnect() assert dome.is_connected is False