follow standard formatting for python tests

This commit is contained in:
Bertrand Lanson 2023-03-16 23:09:07 +01:00
parent 7464ae2f26
commit 69f3f80707
3 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
"""Role testing files using testinfra."""
def test_hosts_file(host):
"""Validate /etc/hosts file."""
etc_hosts = host.file("/etc/hosts")

View File

@ -1,8 +1,11 @@
"""PyTest Fixtures."""
from __future__ import absolute_import
import os
import pytest
def pytest_runtest_setup(item):
"""Run tests only when under molecule with testinfra installed."""
try:

View File

@ -1,5 +1,6 @@
"""Role testing files using testinfra."""
def test_hosts_file(host):
"""Validate /etc/hosts file."""
etc_hosts = host.file("/etc/hosts")