Skip to content

Commit 9448334

Browse files
committed
adding utils unit test
1 parent 7090742 commit 9448334

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/unit/test_utils.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@
1313
import pytest
1414
import wfcommons.utils
1515

16-
from typing import Dict
16+
from typing import Dict, List, Tuple
1717

1818

1919
class TestUtils:
20+
21+
@pytest.mark.unit
22+
@pytest.mark.parametrize(
23+
"data,distribution",
24+
[
25+
pytest.param([1, 2, 3], ("rdist", (1.5504806356651624, 0.0013236200991527764, 0.0013236200991527767))),
26+
pytest.param([1, 1, 1], ("pareto", (2.25803497307119, -7.535551383120264e-19, 4.806600020282434e-19))),
27+
],
28+
)
29+
def test_best_fit_distribution(self, data: List[float], distribution: Tuple) -> None:
30+
assert(wfcommons.utils.best_fit_distribution(data) == distribution)
2031

2132
@pytest.mark.unit
2233
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)