Skip to content

Commit

Permalink
Bump test tooling versions, and fix poly unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop committed Nov 8, 2022
1 parent 874990c commit e5dedcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Expand Up @@ -72,8 +72,8 @@ include = [
dependencies = [
'formulaic[arrow,calculus]; python_version < "3.11"',
'formulaic[calculus]; python_version == "3.11"',
"pytest==6.2.5",
"pytest-cov==3.0.0",
"pytest==7.2.0",
"pytest-cov==4.0.0",
]

[tool.hatch.envs.default.scripts]
Expand All @@ -88,8 +88,8 @@ python = ["37"]
[tool.hatch.envs.test_min]
dependencies = [
"formulaic[arrow,calculus]",
"pytest==6.2.5",
"pytest-cov==3.0.0",
"pytest==7.2.0",
"pytest-cov==4.0.0",
"astor==0.8",
"cached-property==1.3.0; python_version < \"3.8\"",
"graphlib-backport==1.0.0; python_version < \"3.9\"",
Expand Down
10 changes: 5 additions & 5 deletions tests/transforms/test_poly.py
Expand Up @@ -47,8 +47,8 @@ def test_basic(self, data):
r_reference,
)

assert pytest.approx(state["alpha"], {0: 0.5})
assert pytest.approx(state["norms2"], {0: 21.0, 2: 1.925})
assert state["alpha"] == pytest.approx({0: 0.5})
assert state["norms2"] == pytest.approx({0: 21.0, 1: 1.925})

assert numpy.allclose(
poly(data, _state=state)[:, 0],
Expand Down Expand Up @@ -95,9 +95,9 @@ def test_degree(self, data):
r_reference,
)

assert pytest.approx(state["alpha"], {0: 0.5, 1: 0.5, 2: 0.5})
assert pytest.approx(
state["norms2"], {1: 0.09166666666666667, 2: 0.07283333333333333}
assert state["alpha"] == pytest.approx({0: 0.5, 1: 0.5, 2: 0.5})
assert state["norms2"] == pytest.approx(
{0: 21.0, 1: 1.925, 2: 0.14020416666666669, 3: 0.009734175}
)

assert numpy.allclose(
Expand Down

0 comments on commit e5dedcb

Please sign in to comment.