diff --git a/src/endstone_test/command_executor.py b/src/endstone_test/command_executor.py index 576d45e..c14cd27 100644 --- a/src/endstone_test/command_executor.py +++ b/src/endstone_test/command_executor.py @@ -1,7 +1,6 @@ import json from endstone import ColorFormat, Player -from endstone.lang import Translatable as tr from endstone.command import ( Command, CommandExecutor, @@ -9,6 +8,7 @@ ConsoleCommandSender, ) from endstone.form import * +from endstone.lang import Translatable as tr class TestCommandExecutor(CommandExecutor): diff --git a/src/endstone_test/event_listener.py b/src/endstone_test/event_listener.py index 572c02b..12691a0 100644 --- a/src/endstone_test/event_listener.py +++ b/src/endstone_test/event_listener.py @@ -1,6 +1,7 @@ from endstone import ColorFormat, Server from endstone.event import * from endstone.plugin import Plugin + from endstone_test.test_helper import run_tests diff --git a/src/endstone_test/plugin.py b/src/endstone_test/plugin.py index 0914ecd..8265ae8 100644 --- a/src/endstone_test/plugin.py +++ b/src/endstone_test/plugin.py @@ -1,10 +1,8 @@ -from pathlib import Path - import pytest from endstone.plugin import Plugin from endstone_test.event_listener import EventListener -from endstone_test.test_helper import run_tests +from endstone_test.test_helper import FixtureInjection, run_tests class EndstoneTest(Plugin): diff --git a/src/endstone_test/tests/on_load/test_plugin.py b/src/endstone_test/tests/on_load/test_plugin.py index 8186665..dcb2d40 100644 --- a/src/endstone_test/tests/on_load/test_plugin.py +++ b/src/endstone_test/tests/on_load/test_plugin.py @@ -1,7 +1,7 @@ +from endstone.command import CommandSenderWrapper from endstone.plugin import Plugin from endstone_test import EndstoneTest -from endstone.command import CommandSenderWrapper def test_instance(plugin: Plugin): diff --git a/src/endstone_test/tests/on_load/test_server.py b/src/endstone_test/tests/on_load/test_server.py index b2c35b8..ef5ef22 100644 --- a/src/endstone_test/tests/on_load/test_server.py +++ b/src/endstone_test/tests/on_load/test_server.py @@ -3,8 +3,8 @@ import pytest from endstone import Server, __minecraft_version__ -from endstone.plugin import Plugin from endstone.command import CommandSenderWrapper +from endstone.plugin import Plugin @pytest.fixture @@ -49,7 +49,7 @@ def test_online_mode(plugin: Plugin, server: Server) -> None: assert False -def test_command_wrapper(server: Server): +def test_command_sender_wrapper(server: Server): messages = [] def on_message(message): diff --git a/src/endstone_test/tests/on_player_join/test_block.py b/src/endstone_test/tests/on_player_join/test_block.py index 4cf4313..d97df08 100644 --- a/src/endstone_test/tests/on_player_join/test_block.py +++ b/src/endstone_test/tests/on_player_join/test_block.py @@ -1,7 +1,7 @@ +import pytest from babel import Locale -from endstone import Player, Server, GameMode +from endstone import GameMode, Player, Server from endstone.plugin import Plugin -import pytest @pytest.fixture diff --git a/src/endstone_test/tests/on_player_join/test_command.py b/src/endstone_test/tests/on_player_join/test_command.py index e7b4f4e..c321348 100644 --- a/src/endstone_test/tests/on_player_join/test_command.py +++ b/src/endstone_test/tests/on_player_join/test_command.py @@ -1,5 +1,5 @@ -from endstone import Player, Server import pytest +from endstone import Player, Server @pytest.fixture diff --git a/src/endstone_test/tests/on_player_join/test_player.py b/src/endstone_test/tests/on_player_join/test_player.py index 6554241..3beaf71 100644 --- a/src/endstone_test/tests/on_player_join/test_player.py +++ b/src/endstone_test/tests/on_player_join/test_player.py @@ -1,7 +1,7 @@ +import pytest from babel import Locale -from endstone import Player, Server, GameMode +from endstone import GameMode, Player, Server from endstone.plugin import Plugin -import pytest @pytest.fixture