-
Notifications
You must be signed in to change notification settings - Fork 193
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
Add unit tests for RqMachine. #466
Add unit tests for RqMachine. #466
Conversation
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. One small style note to consider.
rqd/rqd/rqmachine.py
Outdated
with open(rqconstants.PATH_MEMINFO, "r") as fp: | ||
meminfoLines = fp.readlines() | ||
for line in meminfoLines: |
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.
As a pattern I tend to prefer the following since it doesn't store the entire file in memory (probably not of concern with such a small file):
with open(rqconstants.PATH_MEMINFO) as fp:
for line in fp:
...
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.
Good point, updated.
Link the Issue(s) this Pull Request is related to.
#396
Summarize your change.
Coverage up to 82% now in that file.