Closed chernals closed 3 years ago
@coldfix OK, done for the operators.
Do you want unit test for the class? In a new file or within one of the two existing ones?
The same file will be fine, thanks!
@coldfix I've created a single testcase testing each of the operators. Let me know if you'd rather i restructure it somehow.
Great, thanks!
Looks fine for now. I'll wait for the test to pass and then merge. I might later add a small check for comparisons against plain lists.
I guess flake8 didn't like my formatting... I've reformatted the lines in question, and doublechecked with flake8; everything seems in order now :+1:
Hey, thanks.
I suggest to change the line to
return other == self._values
to allow comparison with native lists and other list-like objects. While at it, maybe add__le__
as well, so that comparison works same as with lists.Best also add tests for
==
,!=
,<
,<=
,>
,>=