def test_plot_comparision_empirical_probability_gender_proportion(mock_data):
    modlist = list([
        Basic_stochastic_model(**mock_data),
        Basic_stochastic_model_fixed_promotion(**mock_data),
        Stochastic_model_with_promotion_and_first_hiring(**mock_data)
    ])
    c = Comparison(modlist)
    c.plot_comparison_empirical_probability_gender_proportion(100, 0.19)
def test_comparison_model_plot_detail(mock_data):
    modlist = list([
        Replication_model(**mock_data),
        Basic_stochastic_model(**mock_data),
        Stochastic_model_with_promotion_and_first_hiring(**mock_data)
    ])
    c = Comparison(modlist)
    c.plot_comparison_detail(10)
def test_comparison_model_param_sweep_detail(mock_data):
    modlist = list([
        Replication_model(**mock_data),
        Basic_stochastic_model(**mock_data),
        Stochastic_model_with_promotion_and_first_hiring(**mock_data)
    ])
    c = Comparison(modlist)
    c.plot_parameter_sweep_detail(10, 'female_promotion_probability_2', 0.1,
                                  0.5, 8)
def test_base_model_plot_multiple_runs(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_multiple(10)
    t.plot_multiple_runs_detail()
def test_base_model_multiple_runs_persistent_state(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_multiple(10)
    assert (isinstance(t.mean_matrix, np.ndarray))
def test_base_model_multiple_runs(mock_data):
    t = Basic_stochastic_model(**mock_data)
    assert (isinstance(t.run_multiple(10), int))
def test_basic_stochastic_model_run_with_saved_data(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_model()
    assert isinstance(t.run, np.recarray)
def test_basic_stochastic_model_run(mock_data):
    t = Basic_stochastic_model(**mock_data).run_model()
    assert isinstance(t, np.recarray)
def test_basic_stochastic_model(mock_data):
    assert (isinstance(Basic_stochastic_model(**mock_data),
                       Basic_stochastic_model))
def test_base_model_plot_multiple_runs(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_multiple(10)
    t.plot_multiple_runs_detail()
def test_base_model_multiple_runs_persistent_state(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_multiple(10)
    assert (isinstance(t.mean_matrix, np.ndarray))
def test_base_model_multiple_runs(mock_data):
    t = Basic_stochastic_model(**mock_data)
    assert (isinstance(t.run_multiple(10), int))
def test_basic_stochastic_with_random_dept_growth(mock_data):
    t = Basic_stochastic_model(**mock_data)
    assert (t.max_threshold, 0.1)
def test_basic_stochastic_model_promotion_probability_recovery(mock_data):
    t = Basic_stochastic_model(**mock_data)
    assert (t.female_promotion_probability_2 == 0.188)
def test_basic_stochastic_model_run_with_saved_data(mock_data):
    t = Basic_stochastic_model(**mock_data)
    t.run_model()
    assert isinstance(t.run, np.recarray)