import pytest
import os
import ogusa
from ogusa import SS, TPI

CUR_PATH = os.path.abspath(os.path.dirname(__file__))
PUF_PATH = os.path.join(CUR_PATH, '../puf.csv')


@pytest.mark.full_run
@pytest.mark.parametrize('frisch', [0.1, 0.4, 0.8],
                         ids=['Frisch 0.1', 'Frisch 0.4', 'Frisch 0.8'])
def test_frisch(frisch):
    from ogusa.scripts.execute import runner
    output_base = "./OUTPUT"
    input_dir = "./OUTPUT"
    user_params = {'frisch': frisch, 'debt_ratio_ss': 1.0}
    runner(output_base=output_base, baseline_dir=input_dir, test=False,
           time_path=False, baseline=True, age_specific=True,
           user_params=user_params, run_micro=False,
           small_open=False, budget_balance=False, data=PUF_PATH)


@pytest.mark.full_run
@pytest.mark.parametrize('g_y_annual', [-0.01,  0.0, 0.03, 0.08, 0.2, 1.0],
                         ids=['-0.01', '0.0', '0.03', '0.08', '0.2', '1.0'])
def test_gy(g_y_annual):
    from ogusa.scripts.execute import runner
    # # Monkey patch enforcement flag since small data won't pass checks
    # SS.ENFORCE_SOLUTION_CHECKS = True
    # TPI.ENFORCE_SOLUTION_CHECKS = True
    output_base = "./OUTPUT"
    input_dir = "./OUTPUT"
    user_params = {'frisch': 0.41, 'debt_ratio_ss': 1.0,
                   'g_y_annual': g_y_annual}
    runner(output_base=output_base, baseline_dir=input_dir, test=False,
           time_path=False, baseline=True, age_specific=True,
           user_params=user_params, run_micro=False,
           small_open=False, budget_balance=False, data=PUF_PATH)

@@ -222,16 +222,17 @@
 h', %5B0.1
+5
 , 0.4, 0
@@ -277,16 +277,17 @@
 isch 0.1
+5
 ', 'Fris
@@ -823,34 +823,12 @@
 01, 
- 0.0, 0.03, 0.08, 0.2, 1.0
+0.05
 %5D,%0A 
@@ -873,38 +873,9 @@
 '0.0
-', '0.03', '0.08', '0.2', '1.0
+5
 '%5D)%0A
@@ -948,162 +948,8 @@
 ner%0A
-    # # Monkey patch enforcement flag since small data won't pass checks%0A    # SS.ENFORCE_SOLUTION_CHECKS = True%0A    # TPI.ENFORCE_SOLUTION_CHECKS = True%0A
     

set final ranges to working values