You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I began testing out adding support for the ZiB, YiB, Zib, and Yib units while working on #53. This broke the (new) unit tests immediately and in a non-obvious way. For example, when parsing 654 Zo:
======================================================================
FAIL: parse_string works on zettaoctet strings
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tbielawa/Projects/bitmath/tests/test_parse.py", line 87, in test_parse_Zo
compare_to)
AssertionError: ZB(654.0) != ZB(654.0)
Interesting I think that the error message says two equal things are not equal, ZB(654.0) != ZB(654.0).
I did some initial debugging and figured out how the comparison is failing. It appears that the instances bytes parameters are of different types!
I began testing out adding support for the
ZiB
,YiB
,Zib
, andYib
units while working on #53. This broke the (new) unit tests immediately and in a non-obvious way. For example, when parsing654 Zo
:Interesting I think that the error message says two equal things are not equal, ZB(654.0) != ZB(654.0).
I did some initial debugging and figured out how the comparison is failing. It appears that the instances
bytes
parameters are of different types!Throw this into python real quck:
BUT, you can work around this issue by explicitly instantiating the 'to parse' and the 'comparison' instances as floating point numbers
For now I'm going to remove the code I added for the new unit support and then revisit this after finishing up the work in #53
The text was updated successfully, but these errors were encountered: