Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 12, 2021
1 parent 7a99c79 commit cac5a29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def test_root_th1f_convert() -> None:
th = ROOT.TH1F("h1", "h1", 50, -2.5, 2.5)
th.FillRandom("gaus", 10000)
h = ensure_plottable_histogram(th)
assert all(th.GetBinContent(i+1) == approx(iv) for i, iv in enumerate(h.values()))
assert all(th.GetBinContent(i + 1) == approx(iv) for i, iv in enumerate(h.values()))
assert all(
th.GetBinError(i+1) == approx(ie)
th.GetBinError(i + 1) == approx(ie)
for i, ie in enumerate(np.sqrt(h.variances()))
)

Expand All @@ -28,12 +28,12 @@ def test_root_th2f_convert() -> None:
th.FillRandom("xyg", 10000)
h = ensure_plottable_histogram(th)
assert all(
th.GetBinContent(i+1, j+1) == approx(iv)
th.GetBinContent(i + 1, j + 1) == approx(iv)
for i, row in enumerate(h.values())
for j, iv in enumerate(row)
)
assert all(
th.GetBinError(i+1, j+1) == approx(ie)
th.GetBinError(i + 1, j + 1) == approx(ie)
for i, row in enumerate(np.sqrt(h.variances()))
for j, ie in enumerate(row)
)

0 comments on commit cac5a29

Please sign in to comment.