Skip to content

Commit

Permalink
style: replace format() with f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sijis committed Oct 29, 2023
1 parent b6acb81 commit 0c82cc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/commands_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def test_plugin_cycle(testbot):

for plugin in plugins:
testbot.assertInCommand(
"!repos install {0}".format(plugin), "Installing {0}...".format(plugin)
f"!repos install {plugin}",
f"Installing {plugin}..."
),
assert (
"A new plugin repository has been installed correctly from errbotio/err-helloworld"
Expand Down Expand Up @@ -231,7 +232,7 @@ def test_webserver_webhook_test(testbot):

def test_activate_reload_and_deactivate(testbot):
for command in ("activate", "reload", "deactivate"):
testbot.push_message("!plugin {}".format(command))
testbot.push_message(f"!plugin {command}")
m = testbot.pop_message()
assert "Please tell me which of the following plugins to" in m
assert "ChatRoom" in m
Expand Down Expand Up @@ -350,7 +351,7 @@ def test_callback_no_command(testbot):
)

cmd = "!this_is_not_a_real_command_at_all"
expected_str = "Command fell through: {}".format(cmd)
expected_str = f"Command fell through: {cmd}"

testbot.exec_command("!plugin deactivate CommandNotFoundFilter")
testbot.bot.plugin_manager._extra_plugin_dir = extra_plugin_dir
Expand Down

0 comments on commit 0c82cc9

Please sign in to comment.