mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
[PR #7271/9489a1ea backport][stable-7] New Module: gio_mime (#7293)
* New Module: gio_mime (#7271) * gio_mime: new module * multiple changes - fixed gio_mime module utils handler detection - add message to test helper assertion - add unit test * gio mime output uses unicode smart quotes * test helper: do not use skip/xfail reason messages - break in old pytest * Update plugins/modules/gio_mime.py Co-authored-by: Felix Fontein <felix@fontein.de> * change exist variables to meet standards --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit9489a1ea1c
) * Add ignore for 2.17. (cherry picked from commitc4009deeb1
) --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
61e82c50e4
commit
8f27ef76f5
13 changed files with 240 additions and 3 deletions
|
@ -51,9 +51,9 @@ class _BaseContext(object):
|
|||
|
||||
test_flags = self.test_flags()
|
||||
if test_flags.get("skip"):
|
||||
pytest.skip(reason=test_flags["skip"])
|
||||
pytest.skip()
|
||||
if test_flags.get("xfail"):
|
||||
pytest.xfail(reason=test_flags["xfail"])
|
||||
pytest.xfail()
|
||||
|
||||
func()
|
||||
|
||||
|
@ -90,7 +90,7 @@ class _RunCmdContext(_BaseContext):
|
|||
print("call args list =\n%s" % call_args_list)
|
||||
print("expected args list =\n%s" % expected_call_args_list)
|
||||
|
||||
assert self.mock_run_cmd.call_count == len(self.run_cmd_calls)
|
||||
assert self.mock_run_cmd.call_count == len(self.run_cmd_calls), "{0} != {1}".format(self.mock_run_cmd.call_count, len(self.run_cmd_calls))
|
||||
if self.mock_run_cmd.call_count:
|
||||
assert call_args_list == expected_call_args_list
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue