@@ -82,7 +82,9 @@ def test_Dot(constructor, coordinates):
82
82
vector .obj (** dict (zip (["rho" , "phi" ], constructor ))), coordinates
83
83
)().dot (
84
84
getattr (vector .obj (** dict (zip (["rho" , "phi" ], constructor ))), coordinates )()
85
- )
85
+ ),
86
+ 1.0e-6 ,
87
+ 1.0e-6 ,
86
88
)
87
89
88
90
@@ -91,18 +93,10 @@ def test_Dot(constructor, coordinates):
91
93
constructor1 = st .tuples (
92
94
st .floats (min_value = - 10e7 , max_value = 10e7 ),
93
95
st .floats (min_value = - 10e7 , max_value = 10e7 ),
94
- )
95
- | st .tuples (
96
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
97
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
98
96
),
99
97
constructor2 = st .tuples (
100
98
st .floats (min_value = - 10e7 , max_value = 10e7 ),
101
99
st .floats (min_value = - 10e7 , max_value = 10e7 ),
102
- )
103
- | st .tuples (
104
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
105
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
106
100
),
107
101
)
108
102
def test_fuzz_Dot (constructor1 , constructor2 , coordinates ):
@@ -137,10 +131,6 @@ def test_Mag2(constructor, coordinates):
137
131
st .floats (min_value = - 10e7 , max_value = 10e7 ),
138
132
st .floats (min_value = - 10e7 , max_value = 10e7 ),
139
133
)
140
- | st .tuples (
141
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
142
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
143
- )
144
134
)
145
135
def test_fuzz_Mag2 (constructor , coordinates ):
146
136
assert ROOT .Math .Polar2DVector (* constructor ).Mag2 () == pytest .approx (
@@ -166,10 +156,6 @@ def test_Mag(constructor, coordinates):
166
156
st .floats (min_value = - 10e7 , max_value = 10e7 ),
167
157
st .floats (min_value = - 10e7 , max_value = 10e7 ),
168
158
)
169
- | st .tuples (
170
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
171
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
172
- )
173
159
)
174
160
def test_fuzz_Mag (constructor , coordinates ):
175
161
assert ROOT .Math .sqrt (
@@ -193,10 +179,6 @@ def test_Phi(constructor, coordinates):
193
179
st .floats (min_value = - 10e7 , max_value = 10e7 ),
194
180
st .floats (min_value = - 10e7 , max_value = 10e7 ),
195
181
)
196
- | st .tuples (
197
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
198
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
199
- )
200
182
)
201
183
def test_fuzz_Phi (constructor , coordinates ):
202
184
assert ROOT .Math .Polar2DVector (* constructor ).Phi () == pytest .approx (
@@ -230,13 +212,8 @@ def test_Rotate(constructor, angle, coordinates):
230
212
constructor = st .tuples (
231
213
st .floats (min_value = - 10e7 , max_value = 10e7 ),
232
214
st .floats (min_value = - 10e7 , max_value = 10e7 ),
233
- )
234
- | st .tuples (
235
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
236
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
237
215
),
238
- angle = st .floats (min_value = - 10e7 , max_value = 10e7 )
239
- | st .integers (min_value = - 10e7 , max_value = 10e7 ),
216
+ angle = st .floats (min_value = - 10e7 , max_value = 10e7 ),
240
217
)
241
218
def test_fuzz_Rotate (constructor , angle , coordinates ):
242
219
ref_vec = ROOT .Math .Polar2DVector (* constructor )
@@ -271,10 +248,6 @@ def test_Unit(constructor, coordinates):
271
248
st .floats (min_value = - 10e7 , max_value = 10e7 ),
272
249
st .floats (min_value = - 10e7 , max_value = 10e7 ),
273
250
)
274
- | st .tuples (
275
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
276
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
277
- )
278
251
)
279
252
def test_fuzz_Unit (constructor , coordinates ):
280
253
ref_vec = ROOT .Math .Polar2DVector (* constructor ).Unit ()
@@ -298,10 +271,6 @@ def test_X_and_Y(constructor, coordinates):
298
271
st .floats (min_value = - 10e7 , max_value = 10e7 ),
299
272
st .floats (min_value = - 10e7 , max_value = 10e7 ),
300
273
)
301
- | st .tuples (
302
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
303
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
304
- )
305
274
)
306
275
def test_fuzz_X_and_Y (constructor , coordinates ):
307
276
ref_vec = ROOT .Math .Polar2DVector (* constructor )
@@ -337,18 +306,10 @@ def test_add(constructor, coordinates):
337
306
constructor1 = st .tuples (
338
307
st .floats (min_value = - 10e7 , max_value = 10e7 ),
339
308
st .floats (min_value = - 10e7 , max_value = 10e7 ),
340
- )
341
- | st .tuples (
342
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
343
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
344
309
),
345
310
constructor2 = st .tuples (
346
311
st .floats (min_value = - 10e7 , max_value = 10e7 ),
347
312
st .floats (min_value = - 10e7 , max_value = 10e7 ),
348
- )
349
- | st .tuples (
350
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
351
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
352
313
),
353
314
)
354
315
def test_fuzz_add (constructor1 , constructor2 , coordinates ):
@@ -398,18 +359,10 @@ def test_sub(constructor, coordinates):
398
359
constructor1 = st .tuples (
399
360
st .floats (min_value = - 10e7 , max_value = 10e7 ),
400
361
st .floats (min_value = - 10e7 , max_value = 10e7 ),
401
- )
402
- | st .tuples (
403
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
404
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
405
362
),
406
363
constructor2 = st .tuples (
407
364
st .floats (min_value = - 10e7 , max_value = 10e7 ),
408
365
st .floats (min_value = - 10e7 , max_value = 10e7 ),
409
- )
410
- | st .tuples (
411
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
412
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
413
366
),
414
367
)
415
368
def test_fuzz_sub (constructor1 , constructor2 , coordinates ):
@@ -448,10 +401,6 @@ def test_neg(constructor, coordinates):
448
401
st .floats (min_value = - 10e7 , max_value = 10e7 ),
449
402
st .floats (min_value = - 10e7 , max_value = 10e7 ),
450
403
)
451
- | st .tuples (
452
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
453
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
454
- )
455
404
)
456
405
def test_fuzz_neg (constructor , coordinates ):
457
406
ref_vec = ROOT .Math .Polar2DVector (* constructor ).__neg__ ()
@@ -478,13 +427,8 @@ def test_mul(constructor, scalar, coordinates):
478
427
constructor = st .tuples (
479
428
st .floats (min_value = - 10e7 , max_value = 10e7 ),
480
429
st .floats (min_value = - 10e7 , max_value = 10e7 ),
481
- )
482
- | st .tuples (
483
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
484
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
485
430
),
486
- scalar = st .floats (min_value = - 10e7 , max_value = 10e7 )
487
- | st .integers (min_value = - 10e7 , max_value = 10e7 ),
431
+ scalar = st .floats (min_value = - 10e7 , max_value = 10e7 ),
488
432
)
489
433
def test_fuzz_mul (constructor , scalar , coordinates ):
490
434
ref_vec = ROOT .Math .Polar2DVector (* constructor ).__mul__ (scalar )
@@ -513,13 +457,8 @@ def test_truediv(constructor, scalar, coordinates):
513
457
constructor = st .tuples (
514
458
st .floats (min_value = - 10e7 , max_value = 10e7 ),
515
459
st .floats (min_value = - 10e7 , max_value = 10e7 ),
516
- )
517
- | st .tuples (
518
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
519
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
520
460
),
521
- scalar = st .floats (min_value = - 10e7 , max_value = 10e7 )
522
- | st .integers (min_value = - 10e7 , max_value = 10e7 ),
461
+ scalar = st .floats (min_value = - 10e7 , max_value = 10e7 ),
523
462
)
524
463
def test_fuzz_truediv (constructor , scalar , coordinates ):
525
464
# FIXME:
@@ -552,10 +491,6 @@ def test_eq(constructor, coordinates):
552
491
st .floats (min_value = - 10e7 , max_value = 10e7 ),
553
492
st .floats (min_value = - 10e7 , max_value = 10e7 ),
554
493
)
555
- | st .tuples (
556
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
557
- st .integers (min_value = - 10e7 , max_value = 10e7 ),
558
- )
559
494
)
560
495
def test_fuzz_eq (constructor , coordinates ):
561
496
ref_vec = ROOT .Math .Polar2DVector (* constructor ).__eq__ (
0 commit comments