From 29d45b7a88f6473e44d700f641db11a387850075 Mon Sep 17 00:00:00 2001 From: Jochem Smit Date: Wed, 20 Apr 2022 16:38:19 +0200 Subject: [PATCH] fix deprecation warning in tests --- tests/test_fitting.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_fitting.py b/tests/test_fitting.py index f6cbe600..52f285a2 100644 --- a/tests/test_fitting.py +++ b/tests/test_fitting.py @@ -18,7 +18,7 @@ fit_rates_half_time_interpolate, GenericFitResult, ) -from pyhdx.batch_processing import yaml_to_hdxmset +from pyhdx.batch_processing import StateParser from pyhdx.models import HDXMeasurementSet cwd = Path(__file__).parent @@ -269,8 +269,10 @@ def test_batch_fit(self, tmp_path): # batch fit on delta N/C tail dataset def test_batch_fit_delta(self, tmp_path): yaml_file = input_dir / "data_states_deltas.yaml" - yaml_dict = yaml.safe_load(yaml_file.read_text()) - hdxm_set = yaml_to_hdxmset(yaml_dict, data_dir=input_dir) + yaml_spec = yaml.safe_load(yaml_file.read_text()) + parser = StateParser(yaml_spec, data_src=input_dir) + + hdxm_set = parser.load_hdxmset() guess_output = csv_to_dataframe(output_dir / "ecSecB_guess.csv") gibbs_guess = hdxm_set[0].guess_deltaG(guess_output["rate"])