Skip to content

Commit 8b24204

Browse files
committed
Extend good_examples comment
1 parent eaa3b05 commit 8b24204

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

array_api_tests/test_special_cases.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,10 +1122,14 @@ def parse_binary_docstring(docstring: str) -> List[BinaryCase]:
11221122
)
11231123

11241124

1125+
# test_unary and test_binary naively generate arrays, i.e. arrays that might not
1126+
# meet the condition that is being test. We then forcibly make the array meet
1127+
# the condition by picking a random index to insert an acceptable element.
1128+
#
11251129
# good_example is a flag that tells us whether Hypothesis generated an array
11261130
# with at least on element that is special-cased. We reject the example when
11271131
# its False - Hypothesis will complain if we reject too many examples, thus
1128-
# indicating we should modify the array strategy being used.
1132+
# indicating we've done something wrong.
11291133

11301134

11311135
@pytest.mark.parametrize("func_name, func, case", unary_params)

0 commit comments

Comments
 (0)