follow standard formatting for python tests
This commit is contained in:
parent
7464ae2f26
commit
69f3f80707
@ -1,5 +1,6 @@
|
|||||||
"""Role testing files using testinfra."""
|
"""Role testing files using testinfra."""
|
||||||
|
|
||||||
|
|
||||||
def test_hosts_file(host):
|
def test_hosts_file(host):
|
||||||
"""Validate /etc/hosts file."""
|
"""Validate /etc/hosts file."""
|
||||||
etc_hosts = host.file("/etc/hosts")
|
etc_hosts = host.file("/etc/hosts")
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
"""PyTest Fixtures."""
|
"""PyTest Fixtures."""
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_setup(item):
|
def pytest_runtest_setup(item):
|
||||||
"""Run tests only when under molecule with testinfra installed."""
|
"""Run tests only when under molecule with testinfra installed."""
|
||||||
try:
|
try:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Role testing files using testinfra."""
|
"""Role testing files using testinfra."""
|
||||||
|
|
||||||
|
|
||||||
def test_hosts_file(host):
|
def test_hosts_file(host):
|
||||||
"""Validate /etc/hosts file."""
|
"""Validate /etc/hosts file."""
|
||||||
etc_hosts = host.file("/etc/hosts")
|
etc_hosts = host.file("/etc/hosts")
|
||||||
|
Loading…
Reference in New Issue
Block a user