@@ -25,33 +25,36 @@ def check_params(*value_pairs):
2525 assert (result - expected ) < 0.00001
2626
2727
28- class Test__check_distro :
29- def test_string_bad (self ):
30- with pytest .raises (ValueError ):
31- activity ._check_distro ("junk" )
28+ def test_string_bad ():
29+ with pytest .raises (ValueError ):
30+ activity ._check_distro ("junk" )
3231
33- def test_number (self ):
34- with pytest .raises (ValueError ):
35- activity ._check_distro (45 )
3632
37- def test_pndist_as_class (self ):
38- assert activity ._check_distro (dist .normal , as_class = True ) == dist .normal
33+ def test_number ():
34+ with pytest .raises (ValueError ):
35+ activity ._check_distro (45 )
3936
40- def test_string_good_as_class (self ):
41- assert activity ._check_distro ("normal" , as_class = True ) == dist .normal
4237
43- def test_pndist (self ):
44- assert_dists_are_equivalent (
45- activity ._check_distro (dist .normal , mu = 0 , sigma = 1 ), stats .norm (0 , 1 )
46- )
38+ def test_pndist_as_class ():
39+ assert activity ._check_distro (dist .normal , as_class = True ) == dist .normal
4740
48- def test_string (self ):
49- assert_dists_are_equivalent (
50- activity ._check_distro ("normal" , mu = 0 , sigma = 1 ), stats .norm (0 , 1 )
51- )
5241
53- def test_scipy_dist (self ):
54- assert_dists_are_equivalent (activity ._check_distro (stats .lognorm (s = 2 )), stats .lognorm (s = 2 ))
42+ def test_string_good_as_class ():
43+ assert activity ._check_distro ("normal" , as_class = True ) == dist .normal
44+
45+
46+ def test_pndist ():
47+ assert_dists_are_equivalent (
48+ activity ._check_distro (dist .normal , mu = 0 , sigma = 1 ), stats .norm (0 , 1 )
49+ )
50+
51+
52+ def test_string ():
53+ assert_dists_are_equivalent (activity ._check_distro ("normal" , mu = 0 , sigma = 1 ), stats .norm (0 , 1 ))
54+
55+
56+ def test_scipy_dist ():
57+ assert_dists_are_equivalent (activity ._check_distro (stats .lognorm (s = 2 )), stats .lognorm (s = 2 ))
5558
5659
5760@pytest .mark .parametrize ("ax" , [None , pyplot .gca (), "junk" ])
0 commit comments