diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26a6ebe97..9fd21fa36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - python-version: 3.9 numpy: "numpy" uncertainties: "uncertainties" - extras: "sparse xarray netCDF4 dask[complete]==2023.4.0 graphviz babel==2.8" + extras: "sparse xarray netCDF4 dask[complete]==2023.4.0 graphviz babel==2.8 mip>=1.13" runs-on: ubuntu-latest env: diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py index cd88fb081..f13aaf868 100644 --- a/pint/testsuite/test_quantity.py +++ b/pint/testsuite/test_quantity.py @@ -374,8 +374,8 @@ def test_convert(self): @helpers.requires_mip def test_to_preferred(self): - ureg = UnitRegistry() - Q_ = ureg.Quantity + ureg = self.ureg + Q_ = self.Q_ ureg.define("pound_force_per_square_foot = 47.8803 pascals = psf") ureg.define("pound_mass = 0.45359237 kg = lbm") @@ -412,9 +412,9 @@ def test_to_preferred(self): @helpers.requires_mip def test_to_preferred_registry(self): - ureg = UnitRegistry() - Q_ = ureg.Quantity - ureg.preferred_units = [ + ureg = self.ureg + Q_ = self.Q_ + ureg.default_preferred_units = [ ureg.m, # distance L ureg.kg, # mass M ureg.s, # duration T @@ -427,9 +427,10 @@ def test_to_preferred_registry(self): @helpers.requires_mip def test_autoconvert_to_preferred(self): - ureg = UnitRegistry() - Q_ = ureg.Quantity - ureg.preferred_units = [ + ureg = self.ureg + Q_ = self.Q_ + ureg.autoconvert_to_preferred = True + ureg.default_preferred_units = [ ureg.m, # distance L ureg.kg, # mass M ureg.s, # duration T