mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Run pyupgrade
against the files modified in the merge-forward
This commit is contained in:
parent
fd800f57f1
commit
5fdb598bc4
4 changed files with 4 additions and 4 deletions
|
@ -71,7 +71,7 @@ class SSHCustomModuleTest(SSHCase):
|
|||
cmd = self.run_function("state.sls", arg=["custom_module"])
|
||||
for key in cmd:
|
||||
if not isinstance(cmd, dict) or not isinstance(cmd[key], dict):
|
||||
raise AssertionError("{} is not a proper state return".format(cmd))
|
||||
raise AssertionError(f"{cmd} is not a proper state return")
|
||||
elif not cmd[key]["result"]:
|
||||
raise AssertionError(cmd[key]["comment"])
|
||||
cmd_ret = cmd[key]["changes"].get("ret", None)
|
||||
|
|
|
@ -35,7 +35,7 @@ class SSHStateTest(SSHCase):
|
|||
def _check_request(self, empty=False):
|
||||
check = self.run_function("state.check_request", wipe=False)
|
||||
if empty:
|
||||
self.assertFalse(bool(check), "bool({}) is not False".format(check))
|
||||
self.assertFalse(bool(check), f"bool({check}) is not False")
|
||||
else:
|
||||
self._check_dict_ret(
|
||||
ret=check["default"]["test_run"]["local"]["return"],
|
||||
|
|
|
@ -23,7 +23,7 @@ def install_npm(states):
|
|||
# Just name the thing we're looking for
|
||||
states.npm # pylint: disable=pointless-statement
|
||||
except (CommandExecutionError, AttributeError, AssertionError) as exc:
|
||||
pytest.skip("Unable to install npm - {}".format(exc))
|
||||
pytest.skip(f"Unable to install npm - {exc}")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
|
|
@ -118,7 +118,7 @@ def test_ansible_playbook(salt_call_cli, ansible_inventory, tmp_path):
|
|||
except FactoryTimeout:
|
||||
log.debug("%s took longer than %s seconds", name, timeout)
|
||||
if timeout == timeouts[-1]:
|
||||
pytest.fail("Failed to run {}".format(name))
|
||||
pytest.fail(f"Failed to run {name}")
|
||||
else:
|
||||
assert ret.returncode == 0
|
||||
assert StateResult(ret.data).result is True
|
||||
|
|
Loading…
Add table
Reference in a new issue