File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,9 @@ def ds():
14
14
ds ["SA" ] = ds ["id" ] * 0.1 + 34
15
15
ds ["SA" ].attrs = {"standard_name" : "sea_water_absolute_salinity" }
16
16
return ds
17
+
18
+
19
+ @pytest .fixture (scope = "session" )
20
+ def ureg ():
21
+ pint = pytest .importorskip ("pint" )
22
+ return pint .UnitRegistry ()
Original file line number Diff line number Diff line change 6
6
from .test_imports import gsw_base
7
7
from gsw_xarray ._attributes import _func_attrs
8
8
9
- from pint import UnitRegistry
10
-
11
- ureg = UnitRegistry ()
12
-
13
9
14
10
@pytest .mark .parametrize ("func_name" , gsw_base )
15
- def test_unit_pint (func_name ):
11
+ def test_unit_pint (func_name , ureg ):
12
+
16
13
if func_name in ["indexer" , "match_args_return" , "pchip_interp" ]:
17
14
# Internal gsw cookery or non wrapped functions
18
15
return
You can’t perform that action at this time.
0 commit comments