Skip to content

Commit

Permalink
[Test] Skip pint-based tests for pint<0.17.0
Browse files Browse the repository at this point in the history
The test helpers we use for the pint-based tests require pint 0.17
or newer. This requirement doesn't extend to the cantera.with_units
module, though, which works with with versions at least as far back
as 0.10.1.
  • Loading branch information
speth authored and ischoegl committed Aug 9, 2023
1 parent e058ab9 commit 3ee75b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/python/test_units.py
Expand Up @@ -4,12 +4,14 @@
import sys

import pytest
ctu = pytest.importorskip("cantera.with_units")
pytest.importorskip("pint", "0.17.0")
import cantera.with_units as ctu
import cantera as ct
try:
from pint.testing import assert_allclose
except ModuleNotFoundError:
# pint.testing was introduced in pint 0.20
# assert_quantity_almost_equal was introduced in pint 0.17.
from pint.testsuite.helpers import assert_quantity_almost_equal as assert_allclose


Expand Down

0 comments on commit 3ee75b0

Please sign in to comment.