Skip to content

Commit 4cd2dda

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0e511e1 commit 4cd2dda

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/en/getting-started.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Compare floating-point values with pytest.approx
213213
# content of test_approx.py
214214
import pytest
215215
216+
216217
def test_sum():
217218
assert (0.1 + 0.2) == pytest.approx(0.3)
218219

doc/en/how-to/assert.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ errors are common. Instead of using ``assert abs(a - b) < tol`` or
7878
import pytest
7979
import numpy as np
8080
81+
8182
def test_floats():
8283
assert (0.1 + 0.2) == pytest.approx(0.3)
8384
85+
8486
def test_arrays():
8587
a = np.array([1.0, 2.0, 3.0])
8688
b = np.array([0.9999, 2.0001, 3.0])

0 commit comments

Comments
 (0)