Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Force the user to enter a port during interactive testing.
  • Loading branch information
ianjosephwilson committed May 31, 2013
commit ad388df7b404e7f3d4c608302b089490472b3311
10 changes: 7 additions & 3 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ def test_find(self):

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:
Expand Down