ansible-cli: Remove unnessary trailing space (#74880)
Fixes: #74875 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
840825b79c
commit
8f82e6327f
3 changed files with 5 additions and 2 deletions
3
changelogs/fragments/74875_ansible_version.yml
Normal file
3
changelogs/fragments/74875_ansible_version.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- ansible-cli - remove unnecessary trailing space in ``ansible --version`` (https://github.com/ansible/ansible/issues/74875).
|
|
@ -152,7 +152,7 @@ def _gitinfo():
|
||||||
def version(prog=None):
|
def version(prog=None):
|
||||||
""" return ansible version """
|
""" return ansible version """
|
||||||
if prog:
|
if prog:
|
||||||
result = ["{0} [core {1}] ".format(prog, __version__)]
|
result = ["{0} [core {1}]".format(prog, __version__)]
|
||||||
else:
|
else:
|
||||||
result = [__version__]
|
result = [__version__]
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ def test_ansible_version(capsys, mocker):
|
||||||
version_lines = version[0].splitlines()
|
version_lines = version[0].splitlines()
|
||||||
|
|
||||||
assert len(version_lines) == 9, 'Incorrect number of lines in "ansible --version" output'
|
assert len(version_lines) == 9, 'Incorrect number of lines in "ansible --version" output'
|
||||||
assert re.match(r'ansible \[core [0-9.a-z]+\]', version_lines[0]), 'Incorrect ansible version line in "ansible --version" output'
|
assert re.match(r'ansible \[core [0-9.a-z]+\]$', version_lines[0]), 'Incorrect ansible version line in "ansible --version" output'
|
||||||
assert re.match(' config file = .*$', version_lines[1]), 'Incorrect config file line in "ansible --version" output'
|
assert re.match(' config file = .*$', version_lines[1]), 'Incorrect config file line in "ansible --version" output'
|
||||||
assert re.match(' configured module search path = .*$', version_lines[2]), 'Incorrect module search path in "ansible --version" output'
|
assert re.match(' configured module search path = .*$', version_lines[2]), 'Incorrect module search path in "ansible --version" output'
|
||||||
assert re.match(' ansible python module location = .*$', version_lines[3]), 'Incorrect python module location in "ansible --version" output'
|
assert re.match(' ansible python module location = .*$', version_lines[3]), 'Incorrect python module location in "ansible --version" output'
|
||||||
|
|
Loading…
Reference in a new issue