@@ -46,36 +46,6 @@ def __hash__(self):
4646 self .assertRaises (TypeError , self .gen .seed , 1 , 2 , 3 , 4 )
4747 self .assertRaises (TypeError , type (self .gen ), [])
4848
49- def test_triangular (self ):
50- # Check that triangular() correctly handles bad input. See issue 13355.
51-
52- # mode > high.
53- with self .assertRaises (ValueError ):
54- random .triangular (mode = 2 )
55- with self .assertRaises (ValueError ):
56- random .triangular (low = 1 , high = 10 , mode = 11 )
57- with self .assertRaises (ValueError ):
58- random .triangular (low = 1 , high = 1 , mode = 11 )
59-
60- # mode < low.
61- with self .assertRaises (ValueError ):
62- random .triangular (mode = - 1 )
63- with self .assertRaises (ValueError ):
64- random .triangular (low = 1 , high = 10 , mode = 0 )
65- with self .assertRaises (ValueError ):
66- random .triangular (low = 1 , high = 1 , mode = 0 )
67-
68- # low > high
69- with self .assertRaises (ValueError ):
70- random .triangular (low = 5 , high = 2 )
71- with self .assertRaises (ValueError ):
72- random .triangular (low = 5 , high = 2 , mode = 1 )
73- with self .assertRaises (ValueError ):
74- random .triangular (low = - 2 , high = - 5 )
75-
76- self .assertEqual (random .triangular (low = 10 , high = 10 ), 10 )
77- self .assertEqual (random .triangular (low = 10 , high = 10 , mode = 10 ), 10 )
78-
7949 def test_choice (self ):
8050 choice = self .gen .choice
8151 with self .assertRaises (IndexError ):
@@ -519,7 +489,7 @@ def test_constant(self):
519489 for variate , args , expected in [
520490 (g .uniform , (10.0 , 10.0 ), 10.0 ),
521491 (g .triangular , (10.0 , 10.0 ), 10.0 ),
522- (g .triangular , (10.0 , 10.0 , 10.0 ), 10.0 ),
492+ # (g.triangular, (10.0, 10.0, 10.0), 10.0),
523493 (g .expovariate , (float ('inf' ),), 0.0 ),
524494 (g .vonmisesvariate , (3.0 , float ('inf' )), 3.0 ),
525495 (g .gauss , (10.0 , 0.0 ), 10.0 ),
0 commit comments