1
1
"""
2
2
Tests for special cases.
3
3
4
- The test cases for special casing are built on runtime via the parametrized
5
- test_unary and test_binary functions . Most of this file consists of utility
4
+ Most test cases for special casing are built on runtime via the parametrized
5
+ tests test_unary/ test_binary/test_iop . Most of this file consists of utility
6
6
classes and functions, all bought together to create the test cases (pytest
7
- params), to finally be run through the general test logic of either test_unary
8
- or test_binary.
7
+ params), to finally be run through generalised test logic.
9
8
10
9
TODO: test integer arrays for relevant special cases
11
10
"""
@@ -1165,7 +1164,7 @@ def parse_binary_case_block(case_block: str) -> List[BinaryCase]:
1165
1164
p = pytest .param (func_name , func , case , id = id_ )
1166
1165
unary_params .append (p )
1167
1166
else :
1168
- warn ("TODO " )
1167
+ warn (f"Special cases found for { stub . __name__ } but none were parsed " )
1169
1168
continue
1170
1169
if len (sig .parameters ) == 1 :
1171
1170
warn (f"{ func = } has one parameter '{ param_names [0 ]} ' which is not named 'x'" )
@@ -1190,7 +1189,7 @@ def parse_binary_case_block(case_block: str) -> List[BinaryCase]:
1190
1189
p = pytest .param (func_name , func , case , id = id_ )
1191
1190
binary_params .append (p )
1192
1191
else :
1193
- warn ("TODO " )
1192
+ warn (f"Special cases found for { stub . __name__ } but none were parsed " )
1194
1193
continue
1195
1194
else :
1196
1195
warn (
@@ -1199,7 +1198,7 @@ def parse_binary_case_block(case_block: str) -> List[BinaryCase]:
1199
1198
)
1200
1199
1201
1200
1202
- # test_unary and test_binary naively generate arrays, i.e. arrays that might not
1201
+ # test_{unary/binary/iop} naively generate arrays, i.e. arrays that might not
1203
1202
# meet the condition that is being test. We then forcibly make the array meet
1204
1203
# the condition by picking a random index to insert an acceptable element.
1205
1204
#
0 commit comments