From 97383d2d5d666e4d84dea3dbc0dff4a53fe071a2 Mon Sep 17 00:00:00 2001 From: johnkangw <72617548+johnkangw@users.noreply.github.com> Date: Sat, 30 Apr 2022 17:20:31 -0600 Subject: [PATCH] Mention use of re_assert for strings in approx docs --- src/_pytest/python_api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 5fa219619..622e5cefd 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -666,6 +666,11 @@ def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase: specialised test helpers in :std:doc:`numpy:reference/routines.testing` if you need support for comparisons, NaNs, or ULP-based tolerances. + To match strings using regex, you can use + `Matches `_ + from the + `re_assert package `_. + .. warning:: .. versionchanged:: 3.2