Skip to content

Commit 24b85d3

Browse files
committed
Improved OrderedType coverage
1 parent 47d7adf commit 24b85d3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

graphene/utils/tests/test_orderedtype.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,19 @@ def test_orderedtype_hash():
2323

2424
assert hash(one) == hash(one)
2525
assert hash(one) != hash(two)
26+
27+
28+
def test_orderedtype_resetcounter():
29+
one = OrderedType()
30+
two = OrderedType()
31+
one.reset_counter()
32+
33+
assert one > two
34+
35+
36+
def test_orderedtype_non_orderabletypes():
37+
one = OrderedType()
38+
39+
assert one.__lt__(1) == NotImplemented
40+
assert one.__gt__(1) == NotImplemented
41+
assert not one == 1

0 commit comments

Comments
 (0)