From 0c82cc900c03daee5cae32e8622faa1b8d239771 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Sat, 28 Oct 2023 22:46:33 -0500 Subject: [PATCH] style: replace format() with f-strings --- tests/commands_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/commands_test.py b/tests/commands_test.py index 397596e31..cdbfa2128 100644 --- a/tests/commands_test.py +++ b/tests/commands_test.py @@ -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" @@ -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 @@ -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