Skip to content

Latest commit

 

History

History
 
 

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Tests

All logical game-related and data-related tests are found here.

Unit tests are found under the unit/ directory, integrated tests are found under the integrated/ directory.

Running a test

In order to run any of the tests, the development dependencies are required.

If you installed the modules with the --only main flag, then you can install the missing ones without it like so:

poetry install

The above part requires Poetry to be installed. Please refer to this page to know how to install it. If you wish to know more about this module, see here for its official documentation and here for its official CLI documentation.

You may position yourself in the tests directory using:

cd tests
  • To run all tests in a directory:
pytest .
  • To run all tests of a certain type:
pytest [unit|integrated]  # Either unit or integrated
  • To run all tests of a specific module:
pytest unit/core/test_window.py  # Example
  • To run a specific test of a module:
pytest unit/core/test_window.py::test_window_fullscreen  # Example

If you're in the root directory, make sure to add tests/ to the path argument (e.g. pytest tests/unit/core/test_window.py).