From cef4037ad54b49859cf02d129f68eb1b342297dc Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Tue, 14 Jan 2025 11:30:06 +0100 Subject: [PATCH] Add documentation on running tests to the readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f3c1a32..40e7db9 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,20 @@ The "archive location" link contains the path of the archived file, in local sto ## Development Use `python -m src.auto_archiver --config secrets/orchestration.yaml` to run from the local development environment. +### Testing + +Tests are split using `pytest.mark` into 'core' and 'download' tests. Download tests will hit the network and make API calls (e.g. Twitter, Bluesky etc.) and should be run regularly to make sure that APIs have not changed. + +Tests can be run as follows: +``` +# run core tests +pytest -ra -v -m "not download" # or poetry run pytest -ra -v -m "not download" +# run download tests +pytest -ra -v -m "download" # or poetry run pytest -ra -v -m "download" +# run all tests +pytest -ra -v # or poetry run pytest -ra -v +``` + #### Docker development working with docker locally: * `docker build . -t auto-archiver` to build a local image