def test_critical_values(self): crit_val = c.w_critical_value(self.n, self.alpha, self.alternative) crit_val2 = c.w_critical_value(str(self.n), str(self.alpha), self.alternative) assert crit_val == 25 assert crit_val2 == 25
def test_exceptions(self): with pytest.raises(ValueError): c.w_critical_value(31, 0.05, 'two-tail') with pytest.raises(ValueError): c.w_critical_value(20, 0.02, 'two-tail') with pytest.raises(ValueError): c.w_critical_value(25, 0.05, 'three-tail')
def test_w_critical_value(): n, alpha, alternative = 15, 0.05, 'two-tail' crit_val = c.w_critical_value(n, alpha, alternative) crit_val2 = c.w_critical_value(str(n), str(alpha), alternative) assert crit_val == 25 assert crit_val2 == 25 with pytest.raises(ValueError): c.w_critical_value(31, 0.05, 'two-tail') with pytest.raises(ValueError): c.w_critical_value(20, 0.02, 'two-tail') with pytest.raises(ValueError): c.w_critical_value(25, 0.05, 'three-tail')