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

Android tests refactoring #940

Merged
merged 6 commits into from
Oct 25, 2017
Merged

Android tests refactoring #940

merged 6 commits into from
Oct 25, 2017

Conversation

akinwale
Copy link
Contributor

@akinwale akinwale commented Oct 9, 2017

  • Refactored asserts due to the PYTHONOPTIMIZE flag set for the Android build.
  • Return empty string as the default value if the __doc__ attribute is None in cases where the docstring isn't present (also due to the PYTHONOPTIMIZE flag)

@akinwale
Copy link
Contributor Author

@jackrobison Updated raised errors and tests as per your comments in Slack.

if not int(time.time()) - ts < 600:
raise AssertionError()
if not spot > 0:
raise AssertionError()
self.currency_pair = (market[0:3], market[3:6])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well make these of type ValueError for clarity (first is because timestamp is too dated, second is because spot must be more than 0)

@kaykurokawa
Copy link
Contributor

Is there a reason android must be compiled with PYTHONOPTIMIZE flag?

@akinwale
Copy link
Contributor Author

Is there a reason android must be compiled with PYTHONOPTIMIZE flag?

I'm not sure what the exact reason is as it is a setting from the default kivy / python for android app launcher build. I tried to remove it but that resulted in errors launching the Python modules when trying to run the app.

@jackrobison
Copy link
Member

LGTM

@jackrobison jackrobison merged commit e4d2a3d into master Oct 25, 2017
@lyoshenka lyoshenka deleted the android_tests_refactoring branch October 25, 2017 16:26
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.

None yet

3 participants