-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
# import pytest | ||
# from ..benford import stats as st | ||
import pytest | ||
from ..benford import stats as st | ||
from ..benford.constants import crit_chi2 | ||
|
||
|
||
def test_Z_score_F1D(): | ||
pass | ||
|
||
def test_chi_sq_conf_None(gen_join_expect_found_diff_F1D, capsys): | ||
jefd_F1D = gen_join_expect_found_diff_F1D | ||
chi = st.chi_sq(jefd_F1D, len(jefd_F1D) - 1, None) | ||
out, _ = capsys.readouterr() | ||
assert out == "\nChi-square test needs confidence other than None.\n" | ||
assert chi is None | ||
|
||
|
||
def test_chi_sq_conf_(gen_join_expect_found_diff_F1D, | ||
choose_confidence, capsys): | ||
jefd_F1D = gen_join_expect_found_diff_F1D | ||
ddf = len(jefd_F1D) - 1 | ||
confidence = choose_confidence | ||
chis = st.chi_sq(jefd_F1D, ddf, choose_confidence) | ||
assert chis[1] == crit_chi2[ddf][confidence] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters