diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6895824e1f3f915ddd3e00239cf16545bc9dd18b..4686e14ad2cd063afa49f5372fbb514db704970b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,6 +59,23 @@ poetry run black duniterpy/file.py With `pre-commit`, Black is called on staged files, so the commit should fail in case black would make changes. You will have to add Black changes in order to commit your changes. +## Tests +We are using [`pytest` framework](https://docs.pytest.org/). + +- Run all tests with: +```bash +duniterpy> poetry run pytest +``` + +- Run specific tests by specifying the path to a file: +```bash +duniterpy> poetry run pytest tests/helpers/test_ws2p.py +``` + +- You can even specify a test from the selected file: +```bash +duniterpy> poetry run pytest tests/helpers/test_ws2p.py::test_generate_ws2p_endpoint + ### Update copyright year Follow [this documentation](https://github.com/Lucas-C/pre-commit-hooks#removing-old-license-and-replacing-it-with-a-new-one) Only difference is to update the year in `license_header.txt` rather than `LICENSE.txt`. diff --git a/README.md b/README.md index 1b3be0e10130758b98944cdc117146a533687b65..aa71f20bcc07e944621c538e53f3392b0ca40a75 100644 --- a/README.md +++ b/README.md @@ -111,16 +111,6 @@ poetry install make check ``` -* Run all unit tests (builtin `unittest` module) with: -```bash -make tests -``` - -* Run only some unit tests by passing a special ENV variable: -```bash -make tests TESTS_FILTER=tests.documents.test_block.TestBlock.test_fromraw -``` - ## Packaging and deploy ### PyPI Change and commit and tag the new version number (semantic version number)