mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-04-24 03:00:20 -04:00
Force the user to enter a port during interactive testing.
This commit is contained in:
@@ -32,9 +32,13 @@ class TestBasics(unittest.TestCase):
|
||||
|
||||
def test_open(self):
|
||||
""" Tests connecting to an explicit port. """
|
||||
port = raw_input(
|
||||
'Plug in Arduino board w/LED at pin 13, reset.\n'\
|
||||
'Enter the port where the Arduino is connected, then press enter:')
|
||||
port = None
|
||||
while not port:
|
||||
port = raw_input(
|
||||
'Plug in Arduino board w/LED at pin 13, reset.\n'\
|
||||
'Enter the port where the Arduino is connected, then press enter:')
|
||||
if not port:
|
||||
print 'You must enter a port.'
|
||||
from Arduino import Arduino
|
||||
board = None
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user