diff --git a/docs/running from source.md b/docs/running from source.md index a161265f..ef1594da 100644 --- a/docs/running from source.md +++ b/docs/running from source.md @@ -85,4 +85,4 @@ PyCharm has a built-in version control integration that supports Git. ## Running tests -Run `pip install pytest pytest-subtests`, then use your IDE to run tests or run `pytest` from the source folder. +Information about running tests can be found in [tests.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/tests.md#running-tests) diff --git a/docs/tests.md b/docs/tests.md index 7a3531f0..c8655ccf 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -84,7 +84,19 @@ testing portions of your code that can be tested without relying on a multiworld ## Running Tests -In PyCharm, running all tests can be done by right-clicking the root `test` directory and selecting `run Python tests`. -If you do not have pytest installed, you may get import failures. To solve this, edit the run configuration, and set the -working directory of the run to the Archipelago directory. If you only want to run your world's defined tests, repeat -the steps for the test directory within your world. +#### 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 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 +tests folder within your world. + +You can also find the 'Archipelago Unittests' as an option in the dropdown at the top of the window +next to the run and debug buttons. + +#### Running Tests without Pycharm + +Run `pip install pytest pytest-subtests`, then use your IDE to run tests or run `pytest` from the source folder.