Пример #1
0
    def test_random_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        real_vss = d.calculate_vss(method='random')
        assert real_vss >= d.vss - d.variance
        assert real_vss <= d.vss + d.variance
Пример #2
0
    def test_random_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        real_vss = d.calculate_vss(method='random')
        assert real_vss >= d.vss - d.variance
        assert real_vss <= d.vss + d.variance
Пример #3
0
    def test_gaussian_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        max_deviation = d.variance * 6

        real_vss = d.calculate_vss(method='gaussian')
        assert real_vss >= d.vss - max_deviation
        assert real_vss <= d.vss + max_deviation
Пример #4
0
    def test_gaussian_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        max_deviation = d.variance * 6

        real_vss = d.calculate_vss(method='gaussian')
        assert real_vss >= d.vss - max_deviation
        assert real_vss <= d.vss + max_deviation
Пример #5
0
    def test_error_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        # Should result in a ValueError
        try:
            d.calculate_vss(method='nada')
        except ValueError:
            assert True
        else:
            assert False
Пример #6
0
    def test_error_variance(self):
        d = Capability()
        d.vss = 4.0
        d.variance = 0.5

        # Should result in a ValueError
        try:
            d.calculate_vss(method='nada')
        except ValueError:
            assert True
        else:
            assert False