[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 commit 9489a1ea1c)

* Add ignore for 2.17.

(cherry picked from commit c4009deeb1)

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-09-20 22:04:36 +02:00 committed by GitHub
parent 61e82c50e4
commit 8f27ef76f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 240 additions and 3 deletions

View file

@ -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