Skip to content

Commit 723e378

Browse files
authored
Update getting-started.rst
1 parent c5fd52b commit 723e378

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

doc/en/getting-started.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,23 +202,21 @@ Note that attributes added at class level are *class attributes*, so they will b
202202
Compare floating-point values with pytest.approx
203203
--------------------------------------------------------------
204204

205-
.. note::
206-
207-
``pytest`` also provides a number of utilities to make writing tests easier.
208-
For example, you can use :func:`pytest.approx` to compare floating-point
209-
values that may have small rounding errors:
205+
``pytest`` also provides a number of utilities to make writing tests easier.
206+
For example, you can use :func:`pytest.approx` to compare floating-point
207+
values that may have small rounding errors:
210208

211-
.. code-block:: python
209+
.. code-block:: python
212210
213-
# content of test_approx.py
214-
import pytest
211+
# content of test_approx.py
212+
import pytest
215213
216214
217-
def test_sum():
218-
assert (0.1 + 0.2) == pytest.approx(0.3)
215+
def test_sum():
216+
assert (0.1 + 0.2) == pytest.approx(0.3)
219217
220-
This avoids the need for manual tolerance checks or using
221-
``math.isclose`` and works with scalars, lists, and NumPy arrays.
218+
This avoids the need for manual tolerance checks or using
219+
``math.isclose`` and works with scalars, lists, and NumPy arrays.
222220

223221

224222
Request a unique temporary directory for functional tests

0 commit comments

Comments
 (0)