From acb8f23311ea66b6dce46bbd85db9c08d38ef981 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sat, 16 Jun 2018 10:37:33 +0200 Subject: [PATCH] Fix 2 DeprecationWarnings about invalid escape seq --- src/_pytest/python_api.py | 2 +- src/_pytest/recwarn.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 955fb4165..9257d210c 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -497,7 +497,7 @@ def _is_numpy_array(obj): def raises(expected_exception, *args, **kwargs): - """ + r""" Assert that a code block/function call raises ``expected_exception`` and raise a failure exception otherwise. diff --git a/src/_pytest/recwarn.py b/src/_pytest/recwarn.py index 565af8a3f..7839f5700 100644 --- a/src/_pytest/recwarn.py +++ b/src/_pytest/recwarn.py @@ -85,7 +85,7 @@ class _DeprecatedCallContext(object): def warns(expected_warning, *args, **kwargs): - """Assert that code raises a particular class of warning. + r"""Assert that code raises a particular class of warning. Specifically, the parameter ``expected_warning`` can be a warning class or sequence of warning classes, and the inside the ``with`` block must issue a warning of that class or