mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Standardize test output
This commit is contained in:
parent
2c783c7145
commit
7116c83c4a
2 changed files with 3 additions and 3 deletions
|
@ -276,7 +276,7 @@ class TestInventory(unittest.TestCase):
|
||||||
'inventory_hostname_short': 'thor'}
|
'inventory_hostname_short': 'thor'}
|
||||||
|
|
||||||
def test_hosts_list(self):
|
def test_hosts_list(self):
|
||||||
"""Test the case when playbook 'hosts' var is a list."""
|
# Test the case when playbook 'hosts' var is a list.
|
||||||
inventory = self.script_inventory()
|
inventory = self.script_inventory()
|
||||||
host_names = sorted(['thor', 'loki', 'odin']) # Not sure if sorting is in the contract or not
|
host_names = sorted(['thor', 'loki', 'odin']) # Not sure if sorting is in the contract or not
|
||||||
actual_hosts = inventory.get_hosts(host_names)
|
actual_hosts = inventory.get_hosts(host_names)
|
||||||
|
|
|
@ -290,7 +290,7 @@ class TestRunner(unittest.TestCase):
|
||||||
assert result['changed'] is False
|
assert result['changed'] is False
|
||||||
|
|
||||||
def test_lineinfile(self):
|
def test_lineinfile(self):
|
||||||
"""Unit tests for the lineinfile module, without backref features."""
|
# Unit tests for the lineinfile module, without backref features.
|
||||||
sampleroot = 'rocannon'
|
sampleroot = 'rocannon'
|
||||||
sample_origin = self._get_test_file(sampleroot + '.txt')
|
sample_origin = self._get_test_file(sampleroot + '.txt')
|
||||||
sample = self._get_stage_file(sampleroot + '.out' + '.txt')
|
sample = self._get_stage_file(sampleroot + '.out' + '.txt')
|
||||||
|
@ -447,7 +447,7 @@ class TestRunner(unittest.TestCase):
|
||||||
os.unlink(sample)
|
os.unlink(sample)
|
||||||
|
|
||||||
def test_lineinfile_backrefs(self):
|
def test_lineinfile_backrefs(self):
|
||||||
"""Unit tests for the lineinfile module, with backref features."""
|
# Unit tests for the lineinfile module, with backref features.
|
||||||
sampleroot = 'rocannon'
|
sampleroot = 'rocannon'
|
||||||
sample_origin = self._get_test_file(sampleroot + '.txt')
|
sample_origin = self._get_test_file(sampleroot + '.txt')
|
||||||
origin_lines = [line.strip() for line in open(sample_origin)]
|
origin_lines = [line.strip() for line in open(sample_origin)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue