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
Thank you for a tool that saves me from converting 500+ asserts manually.
However, it failed on a few, one of them being: self.assertEqual(xmap.area_is_free(b, e), used == 0)
which got converted to assert xmap.area_is_free(b, e) == used == 0
but this is not an equivalent code, cause now area_is_free() result (which is False in my particular test case) is compared directly with used value (42 in my case), making the test fail instead of passing as old version did.
It should be: assert xmap.area_is_free(b, e) == (used == 0)
Note: I didn't checked, but same problem probably affects assertNotEqual method, and also applies to other operators like !=, >, <=, etc instead of just ==.
The text was updated successfully, but these errors were encountered:
Thank you for a tool that saves me from converting 500+ asserts manually.
However, it failed on a few, one of them being:
self.assertEqual(xmap.area_is_free(b, e), used == 0)
which got converted to
assert xmap.area_is_free(b, e) == used == 0
but this is not an equivalent code, cause now
area_is_free()
result (which is False in my particular test case) is compared directly withused
value (42 in my case), making the test fail instead of passing as old version did.It should be:
assert xmap.area_is_free(b, e) == (used == 0)
Note: I didn't checked, but same problem probably affects assertNotEqual method, and also applies to other operators like
!=
,>
,<=
, etc instead of just==
.The text was updated successfully, but these errors were encountered: