Skip to content

Commit 63e424c

Browse files
committed
is_collection: add test that range function is not iterable
Replicates graphql/graphql-js@ab329e9
1 parent 8d63f1e commit 63e424c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/pyutils/test_is_collection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def a_values_view_is_a_collection():
4646
def a_range_is_a_collection():
4747
assert is_collection(range(10)) is True
4848

49+
def range_function_itself_is_not_a_collection():
50+
assert is_collection(range) is False
51+
4952
def an_infinite_generator_is_not_a_collection():
5053
assert is_collection(count()) is False
5154

0 commit comments

Comments
 (0)