mirror of
https://github.com/graphql-python/graphene.git
synced 2025-06-27 08:53:11 +03:00
Improved OrderedType coverage
This commit is contained in:
parent
47d7adf7b0
commit
24b85d318c
|
@ -23,3 +23,19 @@ def test_orderedtype_hash():
|
||||||
|
|
||||||
assert hash(one) == hash(one)
|
assert hash(one) == hash(one)
|
||||||
assert hash(one) != hash(two)
|
assert hash(one) != hash(two)
|
||||||
|
|
||||||
|
|
||||||
|
def test_orderedtype_resetcounter():
|
||||||
|
one = OrderedType()
|
||||||
|
two = OrderedType()
|
||||||
|
one.reset_counter()
|
||||||
|
|
||||||
|
assert one > two
|
||||||
|
|
||||||
|
|
||||||
|
def test_orderedtype_non_orderabletypes():
|
||||||
|
one = OrderedType()
|
||||||
|
|
||||||
|
assert one.__lt__(1) == NotImplemented
|
||||||
|
assert one.__gt__(1) == NotImplemented
|
||||||
|
assert not one == 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user