Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.16 KB

File metadata and controls

25 lines (17 loc) · 1.16 KB

Running tests for sphersgeo

sphersgeo has several test suites to ensure that functionality remains consistent and does not break when code changes. In order for a change you make to the code to be accepted and merged, that change must pass existing tests, as well as any new tests you write that cover new functionality.

sphersgeo uses pytest to define and run tests. To install pytest and other required testing tools to your development environment, install sphersgeo in editable mode along with the test dependency group:

pip install -e . --group test

To run tests, simply run pytest:

pytest

pytest recursively searches the given directory (by default .) for any files with a name like test_*.py, and runs all functions it finds that have a name like test_*.

See the pytest documentation for more instructions on using pytest.

Tip

You can control where test results are written by adding --basetemp=<PATH> to your pytest command. pytest will wipe this directory clean for each test session, so make sure it is a scratch area.