-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial test of Arduino Simulator. #358
Initial test of Arduino Simulator. #358
Conversation
Not yet a test of sensors.py, but leading up to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but see comments for my understanding.
expected + ': got scheme {!r}'.format(parts.scheme)) | ||
params = {} | ||
for option, values in urllib.parse.parse_qs(parts.query, True).items(): | ||
if option == 'board' and len(values) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What other option
might be coming in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to test the readline timeout in SerialData.read, I might want to change rate at which the bytes are emitted. We may want to deliberately add an error sometimes to test the response. And you requested a possible change to values other than millis and report_num.
# Basic tests of FakeArduinoSerialHandler. | ||
|
||
def test_create(serial_handlers): | ||
ser = rs232.SerialData(port='arduinosimulator://') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this would raise the Exception with "Unknown board". What am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a "get('board', 'telemetry')" in _create_simulator, so it defaults to the telemetry board. OK?
Codecov Report
@@ Coverage Diff @@
## develop #358 +/- ##
===========================================
+ Coverage 82.94% 83.23% +0.29%
===========================================
Files 51 51
Lines 3441 3441
Branches 438 438
===========================================
+ Hits 2854 2864 +10
+ Misses 441 428 -13
- Partials 146 149 +3
Continue to review full report at Codecov.
|
p.s. we need to add checking of the code style in peas/ |
Yes, good point. I'll do it right now. |
Not yet a test of sensors.py, but leading up to it.