def test_regression_sex_specific(self): """Fisheries-HST: Verify outputs of sex-specific run.""" from natcap.invest.fisheries import fisheries_hst args = { u'gamma': 0.5, u'hab_cont': False, u'habitat_chg_csv_uri': os.path.join(HST_INPUTS, 'habitat_chg_params.csv'), u'habitat_dep_csv_uri': os.path.join(HST_INPUTS, 'habitat_dep_params.csv'), u'pop_cont': False, u'population_csv_uri': os.path.join(TEST_DATA, 'hst_pop_params_sexsp.csv'), u'sexsp': 'Yes', u'workspace_dir': self.workspace_dir, } fisheries_hst.execute(args) natcap.invest.pygeoprocessing_0_3_3.testing.assert_csv_equal( os.path.join(TEST_DATA, 'hst_pop_params_sexsp_modified.csv'), os.path.join(args['workspace_dir'], 'output', 'hst_pop_params_sexsp_modified.csv'))
def test_regression_sex_specific(self): """Fisheries-HST: Verify outputs of sex-specific run.""" from natcap.invest.fisheries import fisheries_hst args = { 'gamma': 0.5, 'hab_cont': False, 'habitat_chg_csv_path': os.path.join(HST_INPUTS, 'habitat_chg_params.csv'), 'habitat_dep_csv_path': os.path.join(HST_INPUTS, 'habitat_dep_params.csv'), 'pop_cont': False, 'population_csv_path': os.path.join(TEST_DATA, 'hst_pop_params_sexsp.csv'), 'sexsp': 'Yes', 'workspace_dir': self.workspace_dir, } fisheries_hst.execute(args) actual_values_df = pandas.read_csv( os.path.join(args['workspace_dir'], 'output', 'hst_pop_params_sexsp_modified.csv')) expected_values_df = pandas.read_csv( os.path.join(TEST_DATA, 'hst_pop_params_sexsp_modified.csv')) pandas.testing.assert_frame_equal(actual_values_df, expected_values_df)