diff --git a/tests/pint_parameters.py b/tests/pint_parameters.py index 91a09dbe..0eac0ec9 100644 --- a/tests/pint_parameters.py +++ b/tests/pint_parameters.py @@ -147,6 +147,13 @@ def test_parameterized_exchange_recalculate(use_pint): assert obj["unit"] == "second" +def test_error_if_recalculated_without_pint(use_pint): + config.use_pint_parameters = False + with pytest.raises(bw2parameters.MissingName): + ActivityParameter.recalculate_exchanges("some_group") + config.use_pint_parameters = True + + def test_mix_parameters_with_and_without_units(use_pint): ProjectParameter.create( name="p_proj2", @@ -209,10 +216,3 @@ def test_mix_parameters_optional_units(use_pint): assert obj.dict["unit"] == "kilogram" config.use_pint_parameters = True - -def test_error_if_recalculated_without_pint(use_pint): - config.use_pint_parameters = False - with pytest.raises(bw2parameters.MissingName): - ActivityParameter.recalculate_exchanges("some_group") - config.use_pint_parameters = True -