Skip to content

Commit d382bf9

Browse files
Tweak test_client_runs_real_geophires_and_caches_across_processes to collect GeophiresXResults instead of just direct_use_heat_breakeven_price_USD_per_MMBTU
1 parent 6a064b7 commit d382bf9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/geophires_x_client_tests/test_multiprocessing_safety.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from queue import Empty
88

99
from geophires_x_client import GeophiresXClient
10+
from geophires_x_client import GeophiresXResult
1011
from geophires_x_client.geophires_input_parameters import EndUseOption
1112
from geophires_x_client.geophires_input_parameters import ImmutableGeophiresInputParameters
1213

@@ -27,7 +28,7 @@ def run_client_in_process(params_dict: dict, log_queue: multiprocessing.Queue, r
2728
client = GeophiresXClient(enable_caching=True)
2829
params = ImmutableGeophiresInputParameters(params_dict)
2930
result = client.get_geophires_result(params)
30-
result_queue.put(result.direct_use_heat_breakeven_price_USD_per_MMBTU)
31+
result_queue.put(result)
3132
except Exception as e:
3233
result_queue.put(e)
3334

@@ -105,7 +106,8 @@ def test_client_runs_real_geophires_and_caches_across_processes(self):
105106
for r in results:
106107
self.assertNotIsInstance(r, Exception, f'A process failed with an exception: {r}')
107108
self.assertIsNotNone(r)
108-
self.assertIsInstance(r, float)
109+
self.assertIsInstance(r, GeophiresXResult)
110+
self.assertIsInstance(r.direct_use_heat_breakeven_price_USD_per_MMBTU, float)
109111

110112
log_records = []
111113
while not log_queue.empty():

0 commit comments

Comments
 (0)