o Sxa@sZdZddlZddlmmZddlZddl Z ddl m Z m Z ddZ e jjddZdS)zTest methods for faster fishersN)exactexact_with_odds_ratioscCs tjddgtjd}tjddgtjd}tjddgtjd}tjddgtjd}t||||d}tj|td d gt||||d }tj|td d gt||||d}tj|tdd gt||||d }tj|dtddgtj|d|dS)z0Test the exact method with numpy arrays as inputZdtype2lessgF]kSU?g=Զ?Zgreaterg?g 4yT?z two-sidedg?rg@g@N)nparrayuint64rZtestingZassert_array_almost_equalr)Za_valuesZb_valuesZc_valuesZd_valuesZlessesZgreatersZ two_tailsZ odds_greatersr4/home/max/code_repo/faster_fishers/tests/test_ext.py test_exactsrcCs0tjddjtjd}|tg|dRdS)zBenchmark fisher tests.r irr N)r randomZrandZastyperr) benchmarkvaluesrrrtest_benchmark_ppisr)__doc__builtins @py_builtins_pytest.assertion.rewrite assertionrewrite @pytest_arnumpyr pytestfaster_fishersrrrmarkrrrrrrs"