Automatic tests ========================== minecraft-launcher-lib uses `Pytest `_ to run some automatic tests. ------------------------- Using Pytest ------------------------- To get started, install pytest together with `requests-mock `_: .. code:: shell pip install pytest requests-mock To run the tests, open a command line in the root directory of minecraft-launcher-lib and execute: .. code:: shell pytest If a test fails, you should fix the bug. ------------------------- Test Coverage ------------------------- To get the test coverage (which lines are executed during the tests) you will need `pytest-cov `_. Install it with pip: .. code:: shell pip install pytest-cov Run pytest with coverage: .. code:: shell pytest -v --cov=minecraft_launcher_lib --cov-report html A new directory called :code:`htmlcov` will be created. Open the :code:`index.html` from this dircetory with your browser to see the coverage report.