@@ -82,7 +82,9 @@ def test_Dot(constructor, coordinates):
8282 vector .obj (** dict (zip (["rho" , "phi" ], constructor ))), coordinates
8383 )().dot (
8484 getattr (vector .obj (** dict (zip (["rho" , "phi" ], constructor ))), coordinates )()
85- )
85+ ),
86+ 1.0e-6 ,
87+ 1.0e-6 ,
8688 )
8789
8890
@@ -91,18 +93,10 @@ def test_Dot(constructor, coordinates):
9193 constructor1 = st .tuples (
9294 st .floats (min_value = - 10e7 , max_value = 10e7 ),
9395 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 ),
9896 ),
9997 constructor2 = st .tuples (
10098 st .floats (min_value = - 10e7 , max_value = 10e7 ),
10199 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 ),
106100 ),
107101)
108102def test_fuzz_Dot (constructor1 , constructor2 , coordinates ):
@@ -137,10 +131,6 @@ def test_Mag2(constructor, coordinates):
137131 st .floats (min_value = - 10e7 , max_value = 10e7 ),
138132 st .floats (min_value = - 10e7 , max_value = 10e7 ),
139133 )
140- | st .tuples (
141- st .integers (min_value = - 10e7 , max_value = 10e7 ),
142- st .integers (min_value = - 10e7 , max_value = 10e7 ),
143- )
144134)
145135def test_fuzz_Mag2 (constructor , coordinates ):
146136 assert ROOT .Math .Polar2DVector (* constructor ).Mag2 () == pytest .approx (
@@ -166,10 +156,6 @@ def test_Mag(constructor, coordinates):
166156 st .floats (min_value = - 10e7 , max_value = 10e7 ),
167157 st .floats (min_value = - 10e7 , max_value = 10e7 ),
168158 )
169- | st .tuples (
170- st .integers (min_value = - 10e7 , max_value = 10e7 ),
171- st .integers (min_value = - 10e7 , max_value = 10e7 ),
172- )
173159)
174160def test_fuzz_Mag (constructor , coordinates ):
175161 assert ROOT .Math .sqrt (
@@ -193,10 +179,6 @@ def test_Phi(constructor, coordinates):
193179 st .floats (min_value = - 10e7 , max_value = 10e7 ),
194180 st .floats (min_value = - 10e7 , max_value = 10e7 ),
195181 )
196- | st .tuples (
197- st .integers (min_value = - 10e7 , max_value = 10e7 ),
198- st .integers (min_value = - 10e7 , max_value = 10e7 ),
199- )
200182)
201183def test_fuzz_Phi (constructor , coordinates ):
202184 assert ROOT .Math .Polar2DVector (* constructor ).Phi () == pytest .approx (
@@ -230,13 +212,8 @@ def test_Rotate(constructor, angle, coordinates):
230212 constructor = st .tuples (
231213 st .floats (min_value = - 10e7 , max_value = 10e7 ),
232214 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 ),
237215 ),
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 ),
240217)
241218def test_fuzz_Rotate (constructor , angle , coordinates ):
242219 ref_vec = ROOT .Math .Polar2DVector (* constructor )
@@ -271,10 +248,6 @@ def test_Unit(constructor, coordinates):
271248 st .floats (min_value = - 10e7 , max_value = 10e7 ),
272249 st .floats (min_value = - 10e7 , max_value = 10e7 ),
273250 )
274- | st .tuples (
275- st .integers (min_value = - 10e7 , max_value = 10e7 ),
276- st .integers (min_value = - 10e7 , max_value = 10e7 ),
277- )
278251)
279252def test_fuzz_Unit (constructor , coordinates ):
280253 ref_vec = ROOT .Math .Polar2DVector (* constructor ).Unit ()
@@ -298,10 +271,6 @@ def test_X_and_Y(constructor, coordinates):
298271 st .floats (min_value = - 10e7 , max_value = 10e7 ),
299272 st .floats (min_value = - 10e7 , max_value = 10e7 ),
300273 )
301- | st .tuples (
302- st .integers (min_value = - 10e7 , max_value = 10e7 ),
303- st .integers (min_value = - 10e7 , max_value = 10e7 ),
304- )
305274)
306275def test_fuzz_X_and_Y (constructor , coordinates ):
307276 ref_vec = ROOT .Math .Polar2DVector (* constructor )
@@ -337,18 +306,10 @@ def test_add(constructor, coordinates):
337306 constructor1 = st .tuples (
338307 st .floats (min_value = - 10e7 , max_value = 10e7 ),
339308 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 ),
344309 ),
345310 constructor2 = st .tuples (
346311 st .floats (min_value = - 10e7 , max_value = 10e7 ),
347312 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 ),
352313 ),
353314)
354315def test_fuzz_add (constructor1 , constructor2 , coordinates ):
@@ -398,18 +359,10 @@ def test_sub(constructor, coordinates):
398359 constructor1 = st .tuples (
399360 st .floats (min_value = - 10e7 , max_value = 10e7 ),
400361 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 ),
405362 ),
406363 constructor2 = st .tuples (
407364 st .floats (min_value = - 10e7 , max_value = 10e7 ),
408365 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 ),
413366 ),
414367)
415368def test_fuzz_sub (constructor1 , constructor2 , coordinates ):
@@ -448,10 +401,6 @@ def test_neg(constructor, coordinates):
448401 st .floats (min_value = - 10e7 , max_value = 10e7 ),
449402 st .floats (min_value = - 10e7 , max_value = 10e7 ),
450403 )
451- | st .tuples (
452- st .integers (min_value = - 10e7 , max_value = 10e7 ),
453- st .integers (min_value = - 10e7 , max_value = 10e7 ),
454- )
455404)
456405def test_fuzz_neg (constructor , coordinates ):
457406 ref_vec = ROOT .Math .Polar2DVector (* constructor ).__neg__ ()
@@ -478,13 +427,8 @@ def test_mul(constructor, scalar, coordinates):
478427 constructor = st .tuples (
479428 st .floats (min_value = - 10e7 , max_value = 10e7 ),
480429 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 ),
485430 ),
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 ),
488432)
489433def test_fuzz_mul (constructor , scalar , coordinates ):
490434 ref_vec = ROOT .Math .Polar2DVector (* constructor ).__mul__ (scalar )
@@ -513,13 +457,8 @@ def test_truediv(constructor, scalar, coordinates):
513457 constructor = st .tuples (
514458 st .floats (min_value = - 10e7 , max_value = 10e7 ),
515459 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 ),
520460 ),
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 ),
523462)
524463def test_fuzz_truediv (constructor , scalar , coordinates ):
525464 # FIXME:
@@ -552,10 +491,6 @@ def test_eq(constructor, coordinates):
552491 st .floats (min_value = - 10e7 , max_value = 10e7 ),
553492 st .floats (min_value = - 10e7 , max_value = 10e7 ),
554493 )
555- | st .tuples (
556- st .integers (min_value = - 10e7 , max_value = 10e7 ),
557- st .integers (min_value = - 10e7 , max_value = 10e7 ),
558- )
559494)
560495def test_fuzz_eq (constructor , coordinates ):
561496 ref_vec = ROOT .Math .Polar2DVector (* constructor ).__eq__ (
0 commit comments