-
Notifications
You must be signed in to change notification settings - Fork 3k
Py3 fixes and Travis CI enablement #9521
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
Conversation
It seems that initializing mock variables in an object isn't enough
Py3 tests were not running as a result
tools/config/__init__.py
Outdated
@@ -1204,7 +1204,8 @@ def validate_config(self): | |||
min = int(str(min), 0) if min is not None else None | |||
max = int(str(max), 0) if max is not None else None | |||
|
|||
if (value < min or (value > max if max is not None else False)): | |||
if ((value < min if min is not None else False) or |
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.
Could this be written:
if ((value < min if min is not None else False) or | |
if ((min is not None and value < min) or |
tools/config/__init__.py
Outdated
@@ -1204,7 +1204,8 @@ def validate_config(self): | |||
min = int(str(min), 0) if min is not None else None | |||
max = int(str(max), 0) if max is not None else None | |||
|
|||
if (value < min or (value > max if max is not None else False)): | |||
if ((value < min if min is not None else False) or | |||
(value > max if max is not None else False)): |
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.
(value > max if max is not None else False)): | |
(max is not None and value > max)): |
Other jobs will follow with other PR
Co-Authored-By: cmonr <[email protected]>
CI started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
This PR seems to have broken building with Python 3 for the 5.11.4 release. This is causing errors in the Mbed CLI CI: https://circleci.com/gh/ARMmbed/mbed-cli/1319?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link |
(I'm working on adding a compile step after the pytests to make sure this kind of thing is hard to reproduce, but I'll be damned if I'm going to do it while relying on |
The fix in #9673 fixed it locally for me, and the CI test will be very welcome! |
Description
Came across some issues when setting up a testing env for Windows Python build issues (https://travis-ci.org/cmonr/mbed-os/builds/485516791), so fixed them as I went along.
This PR only contains the Py3 fixes along with finally enabling Py3 tests in Travis CI.
A Travis CI refactor will followup once this is brought in.
Pull request type
Reviewers