# Path: bmlingam/tests/test_pm3.py
# def _gen_data(i, gen_data_params):
# def _estimate_hparams(xs, infer_params):
# def _mainloop(n_trials, gen_data_params, infer_params, mcmc_params):
# def test_posterior_inference(
#     infer_params=None, mcmc_params=None, gen_data_params=None, 
#     n_trials=50, plot_result=False, plot_samples_all=False, show_result=False, 
#     show_result_all=False):


from copy import deepcopy
from bmlingam.tests.test_pm3 import test_posterior_inference, \
                                    infer_params_default, \
                                    mcmc_params_default, \
                                    gen_data_params_default
import six

                test_posterior_inference(
                    infer_params=infer_params,
                    mcmc_params=mcmc_params,
                    gen_data_params=gen_data_params, 
                    n_trials=n_trials, 
                    plot_result=plot_result, 
                    show_result=show_result, 
                    show_result_all=show_result_all
                )

def test_bmlingam_old(
    infer_params_name='default', mcmc_params_name='default', 
    n_confounderss=[0, 1, 6, 12], n_trials=10, plot_result=True, 
    show_result=True, show_result_all=True):
    """Test inference using old program to make artificial data. 
    """
    infer_paramss = _get_infer_paramss()
    mcmc_paramss = _get_mcmc_paramss()

    print('Test condition')
    print('  infer_params_name = {}'.format(infer_params_name))
    print('  mcmc_params_name = {}'.format(mcmc_params_name))
    print('  gen_data_params_name = None (using old program to make data)\n')

    for n_confounders in n_confounderss:
        gen_data_params = {
            'n_confounders': n_confounders, 
            'n_samples': 100
        }


# Path: bmlingam/tests/test_pm3.py
# def _gen_data(i, gen_data_params):
# def _estimate_hparams(xs, infer_params):
# def _mainloop(n_trials, gen_data_params, infer_params, mcmc_params):
# def test_posterior_inference(
#     infer_params=None, mcmc_params=None, gen_data_params=None, 
#     n_trials=50, plot_result=False, plot_samples_all=False, show_result=False, 
#     show_result_all=False):


# Path: bmlingam/tests/test_bmlingam.py
from copy import deepcopy
from bmlingam.tests.test_pm3 import test_posterior_inference, \
                                    infer_params_default, \
                                    mcmc_params_default, \
                                    gen_data_params_default
import six

                test_posterior_inference(
                    infer_params=infer_params,
                    mcmc_params=mcmc_params,
                    gen_data_params=gen_data_params, 
                    n_trials=n_trials, 
                    plot_result=plot_result, 
                    show_result=show_result, 
                    show_result_all=show_result_all
                )

def test_bmlingam_old(
    infer_params_name='default', mcmc_params_name='default', 
    n_confounderss=[0, 1, 6, 12], n_trials=10, plot_result=True, 
    show_result=True, show_result_all=True):
    """Test inference using old program to make artificial data. 
    """
    infer_paramss = _get_infer_paramss()
    mcmc_paramss = _get_mcmc_paramss()

    print('Test condition')
    print('  infer_params_name = {}'.format(infer_params_name))
    print('  mcmc_params_name = {}'.format(mcmc_params_name))
    print('  gen_data_params_name = None (using old program to make data)\n')

    for n_confounders in n_confounderss:
        gen_data_params = {
            'n_confounders': n_confounders, 
            'n_samples': 100
        }


        test_posterior_inference(
