From 49bdb24bd7b3aacde51627f5a40d196bba337535 Mon Sep 17 00:00:00 2001 From: Jordan Laser Date: Wed, 7 Feb 2024 15:59:30 -0700 Subject: [PATCH] actually fix test --- forcingprocessor/tests/test_forcingprocessor.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/forcingprocessor/tests/test_forcingprocessor.py b/forcingprocessor/tests/test_forcingprocessor.py index f4ab4a92..2445894e 100644 --- a/forcingprocessor/tests/test_forcingprocessor.py +++ b/forcingprocessor/tests/test_forcingprocessor.py @@ -1,4 +1,4 @@ -import pytest, os +import pytest, os, json import pandas as pd from pathlib import Path from datetime import datetime @@ -64,7 +64,12 @@ def test_generate_weights(get_paths): catchment_list = list(weights_df.divide_id.unique()) del weights_df - get_weight_json(catchment_list,0) + weights = get_weight_json(catchment_list,0) + + data = json.dumps(weights) + with open(pytest.full_weight,'w') as fp: + fp.write(data) + assert pytest.full_weight.exists() def test_processor(get_time, get_paths):