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
Is your feature request related to a problem? Please describe.
When writing tests for code that makes use of gspread, we found a pretty tedious task to compare Cell objects, since there's no way to directly compare one instance to another.
Describe the solution you'd like
Be able to comparte Cell objects instances (e.g. cell == another_cell). Taking a look at the code, two Cell instances should be equal when they are placed in the same row and col and contain the same value, so it should be easy to implement the corresponding __eq__ method.
Describe alternatives you've considered
Right now, as a workaround, we're doing assertions on each Cell instance attributes (e.g. cell.row == another_cell.row and cell.col == another_cell.col and cell.value == another_cell.value).
Additional context
I've seen that this feature was already requested here, but was closed without an answer to this request, therefore I decided to open a specific feature request for it.
The text was updated successfully, but these errors were encountered:
Yes it was requested a long time ago but back in that days the API used to represent objects using XML and a Cell object required a complete XML tree or now it's a simple API call that results a JSON with a list of values (meaning I don't want to blame the people that decided not to do it back in that days 😉 )
Is your feature request related to a problem? Please describe.
When writing tests for code that makes use of
gspread
, we found a pretty tedious task to compareCell
objects, since there's no way to directly compare one instance to another.Describe the solution you'd like
Be able to comparte
Cell
objects instances (e.g.cell == another_cell
). Taking a look at the code, twoCell
instances should be equal when they are placed in the samerow
andcol
and contain the samevalue
, so it should be easy to implement the corresponding__eq__
method.Describe alternatives you've considered
Right now, as a workaround, we're doing assertions on each
Cell
instance attributes (e.g.cell.row == another_cell.row and cell.col == another_cell.col and cell.value == another_cell.value
).Additional context
I've seen that this feature was already requested here, but was closed without an answer to this request, therefore I decided to open a specific feature request for it.
The text was updated successfully, but these errors were encountered: