From 8a24b77cf32aed3defc9b70970a453f6fead9489 Mon Sep 17 00:00:00 2001 From: cidrblock Date: Wed, 18 May 2022 10:09:27 -0700 Subject: [PATCH] Silence localhost warnings --- src/pytest_ansible_network_integration/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pytest_ansible_network_integration/__init__.py b/src/pytest_ansible_network_integration/__init__.py index cc1c12a..019e654 100644 --- a/src/pytest_ansible_network_integration/__init__.py +++ b/src/pytest_ansible_network_integration/__init__.py @@ -339,6 +339,8 @@ def environment() -> Dict[str, Any]: env = os.environ.copy() if "VIRTUAL_ENV" in os.environ: env["PATH"] = os.path.join(os.environ["VIRTUAL_ENV"], "bin") + os.pathsep + env["PATH"] + # Disable warnings about localhost, since these are tests + env["ANSIBLE_LOCALHOST_WARNING"] = "False" return env