From 1b1ae306060781c6d78eb2ea2806e1a4effed623 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 28 Apr 2024 14:08:13 -0300 Subject: [PATCH] Apply suggestions from code review --- changelog/12153.doc.rst | 2 +- doc/en/example/simple.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog/12153.doc.rst b/changelog/12153.doc.rst index 2363017f5..ac36becf9 100644 --- a/changelog/12153.doc.rst +++ b/changelog/12153.doc.rst @@ -1 +1 @@ -Updated docs: Documented new way to detect if a code is running from within a pytest run +Documented using :envvar:`PYTEST_VERSION` to detect if code is running from within a pytest run. diff --git a/doc/en/example/simple.rst b/doc/en/example/simple.rst index b5561eee2..dec1bed5f 100644 --- a/doc/en/example/simple.rst +++ b/doc/en/example/simple.rst @@ -413,10 +413,10 @@ running from a test you can do this: if os.environ.get("PYTEST_VERSION") is not None: - # things you want to to do if your code is called by pytest + # Things you want to to do if your code is called by pytest. ... else: - # things you want to to do if your code is not called by pytest + # Things you want to to do if your code is not called by pytest. ...