Skip to content
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

Merged

Conversation

jamessynge
Copy link
Contributor

Not yet a test of sensors.py, but leading up to it.

Not yet a test of sensors.py, but leading up to it.
@jamessynge jamessynge requested a review from wtgee January 15, 2018 22:37
Copy link
Member

@wtgee wtgee left a 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:
Copy link
Member

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?

Copy link
Contributor Author

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://')
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link

codecov bot commented Jan 15, 2018

Codecov Report

Merging #358 into develop will increase coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
pocs/utils/rs232.py 88.49% <100%> (+8.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5e0cb1...593ca8a. Read the comment docs.

@jamessynge
Copy link
Contributor Author

p.s. we need to add checking of the code style in peas/

@wtgee
Copy link
Member

wtgee commented Jan 15, 2018

p.s. we need to add checking of the code style in peas/

Yes, good point. I'll do it right now.

@jamessynge jamessynge merged commit cfd3bd8 into panoptes:develop Jan 16, 2018
@jamessynge jamessynge deleted the issue-354-test-arduino-simulator branch January 16, 2018 00:16
@wtgee wtgee mentioned this pull request Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants