Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
milcent committed Dec 1, 2020
2 parents c21a214 + cab17fb commit ab7d65b
Show file tree
Hide file tree
Showing 5 changed files with 692 additions and 600 deletions.
19 changes: 18 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import pandas as pd
from ..benford import utils as ut
from ..benford.constants import confs
from ..benford.constants import confs, rev_digs


@pytest.fixture
Expand Down Expand Up @@ -33,6 +33,11 @@ def choose_digs():
return choice([1, 2, 3, 22, -2])


@pytest.fixture
def choose_test():
return choice(["F1D","F2D","F3D","SD","L2D"])


@pytest.fixture
def choose_confidence():
return choice(list(confs.keys())[1:])
Expand Down Expand Up @@ -123,6 +128,18 @@ def gen_proportions_L2D(gen_get_digs_df):
return ut.get_proportions(gen_get_digs_df.L2D)


@pytest.fixture
def gen_proportions_random_test(choose_test, gen_get_digs_df):
dig_str = choose_test
return ut.get_proportions(gen_get_digs_df[dig_str]), rev_digs[dig_str]


@pytest.fixture
def gen_join_expect_found_diff_random_test(gen_proportions_random_test):
rand_test, rand_digs = gen_proportions_random_test
return ut.join_expect_found_diff(rand_test, rand_digs)


@pytest.fixture
def gen_join_expect_found_diff_F1D(gen_proportions_F1D):
return ut.join_expect_found_diff(gen_proportions_F1D, 1)
Expand Down

0 comments on commit ab7d65b

Please sign in to comment.