From 8eb5bc90bead2cd612e73990953e6a0907153138 Mon Sep 17 00:00:00 2001 From: Andrey Maslennikov Date: Mon, 25 Sep 2023 15:39:00 +0200 Subject: [PATCH 1/2] Add missing Environment doc section Fixes #736. --- doc/source/modules.rst | 6 ++++++ testinfra/modules/environment.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/source/modules.rst b/doc/source/modules.rst index ebbb3dc2..a140ebed 100644 --- a/doc/source/modules.rst +++ b/doc/source/modules.rst @@ -145,6 +145,12 @@ Docker :members: +Environment +~~~~~~ + +.. autoclass:: testinfra.modules.environment.Environment(name) + :members: + File ~~~~ diff --git a/testinfra/modules/environment.py b/testinfra/modules/environment.py index a762d74e..847127a5 100644 --- a/testinfra/modules/environment.py +++ b/testinfra/modules/environment.py @@ -18,7 +18,7 @@ class Environment(InstanceModule): Example: - >>> host.environment() + >>> host.environment() { "EDITOR": "vim", "SHELL": "/bin/bash", From 4b5ba2967fe666a0f3ad0ebe164b21d2484ec944 Mon Sep 17 00:00:00 2001 From: Andrey Maslennikov Date: Mon, 25 Sep 2023 15:52:29 +0200 Subject: [PATCH 2/2] Fix doc title syntax --- doc/source/modules.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/modules.rst b/doc/source/modules.rst index a140ebed..b7d9bf13 100644 --- a/doc/source/modules.rst +++ b/doc/source/modules.rst @@ -146,7 +146,7 @@ Docker Environment -~~~~~~ +~~~~~~~~~~~ .. autoclass:: testinfra.modules.environment.Environment(name) :members: