summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-03-31 20:50:02 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-03-31 22:56:46 -0500
commita2f0045a7ba3ed302ff91be5c3f5fcd287f69ce2 (patch)
tree271f1488c3df40fc3d1ded357b31beb1f9733098 /CONTRIBUTING.md
parent7435cb64814809d072dceec3404b2f304d89a0a7 (diff)
downloadrequests-cache-a2f0045a7ba3ed302ff91be5c3f5fcd287f69ce2.tar.gz
Split tests into unit and integration tests and run separately in CI; update Contributing Guide with more notes on testing
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 64d0cd2..6b2e7e6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,7 +36,16 @@ To uninstall:
$ pre-commit uninstall
```
-## Integration Tests
+## Testing
+* Tests are divided into unit and integration tests:
+ * Unit tests can be run without any additional setup, and don't depend on any external services
+ * Integration tests depend on additional services, which are easiest to run using Docker
+ (see Integration Tests section below).
+* See [conftest.py](https://github.com/reclosedev/requests-cache/blob/master/tests/conftest.py) for
+ [pytest fixtures](https://docs.pytest.org/en/stable/fixture.html) that apply the most common
+ mocking steps and other test setup.
+
+### Integration Tests
Local databases are required to run integration tests, and docker-compose config is included to make
this easier. First, [install docker](https://docs.docker.com/get-docker/) and
[install docker-compose](https://docs.docker.com/compose/install/).
@@ -44,7 +53,7 @@ this easier. First, [install docker](https://docs.docker.com/get-docker/) and
Then, run:
```bash
$ docker-compose up -d
-pytest test/integration
+pytest tests/integration
```
## Documentation