-
Notifications
You must be signed in to change notification settings - Fork 2
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
time comparisons #18
Comments
I think it is linked to bug #8 |
I hope nothing is broken in the python2 version! I have not installed v8 yet |
@stefraynaud yes I think @dnadeau4 broke this while porting to 3.0, please use |
It's almost impossible to identify all cdtime comparisons in tens of thousands of code lines. |
@stefraynaud agreed! Let's wait and hear @dnadeau4 reasoning on why this is gone. |
@stefraynaud yes you need to use the method cmp attached on objects, sorry my original post was misleading. @dnadeau4 it looks like this needs to be fixed. |
@doutriaux1 no way to re-enable this. "cmp" no longer exist in python3. All tests pass, maybe you could write better tests. |
@dnadeau4 maybe i could you're right. But now @stefraynaud gave you good tests, so thanks. |
It might be a bug in python. I am not sure what is going on with python2. I cannot bring the overload into the python2
In [19]: cdtime.comptime(2000)<cdtime.comptime(2001)
Out[19]: False
In [20]: cdtime.comptime(2000)<cdtime.comptime(2001)
Out[20]: True
In [21]: cdtime.comptime(2000)<cdtime.comptime(2001)
Out[21]: False
In [22]: cdtime.comptime(2000)<cdtime.comptime(2001)
Out[22]: True
In [23]: cdtime.comptime(2000)<cdtime.comptime(2001)
Out[23]: False
In [24]: aa = cdtime.comptime(2000)
In [25]: bb = cdtime.comptime(2001)
...:
In [26]: aa < bb
Out[26]: True
In [27]: aa < bb
Out[27]: True
In [28]: aa < bb
Out[28]: True
In [29]: aa < bb
Out[29]: True |
cmp which is python2 ways to do compare works. In [33]: cdtime.comptime(2000).cmp(cdtime.comptime(2001))
Out[33]: -1
In [34]: cdtime.comptime(2001).cmp(cdtime.comptime(2000))
Out[34]: 1 |
Not sure if that works on the MAC, need testing... |
New test pass on OSX and python |
I had to set 2 different comparisons Python 2 calls Actually, Python 2 will call So |
@stefraynaud Your issue has been solved and merged to master. Although @doutriaux1 test found conversion issues in |
Hi,
time comparisons seem now buggy.
Here are various tests:
What changed?
The text was updated successfully, but these errors were encountered: