11import math
2- import os
32from datetime import timedelta
43
54import numpy as np
2221 StatusCode ,
2322 Variable ,
2423)
24+ from tests .utils import TEST_DATA
2525
2626ptype = {"scipy" : ScipyParticle , "jit" : JITParticle }
2727kernel = {
@@ -197,9 +197,7 @@ def test_advection_RK45(lon, lat, mode, rk45_tol):
197197
198198@pytest .mark .parametrize ("mode" , ["scipy" , "jit" ])
199199def test_advection_3DCROCO (mode ):
200- data_path = os .path .join (os .path .dirname (__file__ ), "test_data/" )
201- fieldset = FieldSet .from_modulefile (data_path + "fieldset_CROCO3D.py" )
202- assert fieldset .U .creation_log == "from_croco"
200+ fieldset = FieldSet .from_modulefile (TEST_DATA / "fieldset_CROCO3D.py" )
203201
204202 runtime = 1e4
205203 X , Z = np .meshgrid ([40e3 , 80e3 , 120e3 ], [- 10 , - 130 ])
@@ -218,9 +216,7 @@ def SampleW(particle, fieldset, time):
218216
219217@pytest .mark .parametrize ("mode" , ["scipy" , "jit" ])
220218def test_advection_2DCROCO (mode ):
221- data_path = os .path .join (os .path .dirname (__file__ ), "test_data/" )
222- fieldset = FieldSet .from_modulefile (data_path + "fieldset_CROCO2D.py" )
223- assert fieldset .U .creation_log == "from_croco"
219+ fieldset = FieldSet .from_modulefile (TEST_DATA / "fieldset_CROCO2D.py" )
224220
225221 runtime = 1e4
226222 X = np .array ([40e3 , 80e3 , 120e3 ])
0 commit comments