Fix forecast.now() not working#26
Merged
jacobtomlinson merged 10 commits intoPerseudonymous:masterfrom Nov 28, 2016
Merged
Conversation
self.date and datetime were in different formats so never evaluating to TRUE
This reverts commit 015fc18.
Collaborator
|
This is great thanks. Do you think you could write a unit test which exposes the bug? |
Contributor
Author
|
Cool. I think I could put something together. On 1 October 2016 at 15:58, Jacob Tomlinson [email protected]
|
Contributor
Author
|
The unit test exposing the forecast.now() bug was failing in Travis CI for Python 2.6 - to fix this I've added a work-around to Forecast.py. |
This was referenced Nov 28, 2016
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was trying to work through your example using this code:
and getting an error as forecast.now() would always return False, and not a timestep object.
It looked to me like the problem was the if statement was comparing two different types, so would never be True.
This fix seems to get the example working for me.
My Python version is: Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]