From 824caaffd0bcc8d706f0e3d7dc6fe62be634d18e Mon Sep 17 00:00:00 2001 From: Emerassi <78173681+Emerassi@users.noreply.github.com> Date: Sun, 11 May 2025 03:41:35 -0700 Subject: [PATCH] Docs: clarify that ModuleUpdate.py is a prerequisite for running tests (#4970) * Update tests.md Spelled out that tests will not run without running UpdateModule.py first and including a link to the instructions on how to do that. * Applied black-silver's feedback and also I ran into tests that don't run correctly unless you also have run Webhost.py once. I have included that in the documentation as well. * More black-silver feedback. --- docs/tests.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/tests.md b/docs/tests.md index a9a19626..13d62b01 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -119,8 +119,12 @@ variable to keep all the benefits of the test framework while not running the ma #### Using Pycharm In PyCharm, running all tests can be done by right-clicking the root test directory and selecting Run 'Archipelago Unittests'. -Unless you configured PyCharm to use pytest as a test runner, you may get import failures. To solve this, edit the run configuration, -and set the working directory to the Archipelago directory which contains all the project files. +If you have never previously run ModuleUpdate.py, then you will need to do this once before the tests will run. +You can run ModuleUpdate.py by right-clicking ModuleUpdate.py and selecting `Run 'ModuleUpdate'`. +After running ModuleUpdate.py you may still get a `ModuleNotFoundError: No module named 'flask'` for the webhost tests. +If this happens, run WebHost.py by right-clicking it and selecting `Run 'WebHost'`. Make sure to press enter when prompted. +Unless you configured PyCharm to use pytest as a test runner, you may get import failures. To solve this, +edit the run configuration, and set the working directory to the Archipelago directory which contains all the project files. If you only want to run your world's defined tests, repeat the steps for the test directory within your world. Your working directory should be the directory of your world in the worlds directory and the script should be the