Files
estimator/tests/unit/pricing/test_pert.py
T

20 lines
417 B
Python

import pytest
from estimator.pricing.pert import expected, sigma, total_sigma
def test_expected_symmetric():
assert expected(8, 12, 16) == pytest.approx(12)
def test_expected_skewed_up():
assert expected(8, 12, 20) == pytest.approx(76 / 6)
def test_sigma():
assert sigma(8, 20) == pytest.approx(2)
def test_total_sigma_is_root_sum_of_squares():
assert total_sigma([3, 4]) == pytest.approx(5)