Skip to content

Commit 76994cc

Browse files
authored
Document tests dependencies (#565)
* Add hint to README to install dev requirements before running tests * Improve tests README
1 parent 01d0938 commit 76994cc

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/README.MD

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1+
# Tests
2+
13
## Pre-reqs
2-
Make sure you have `pytest` and `pydantic` installed:
3-
`pip install pytest pydantic`
4+
5+
Make sure you have venv activated:
6+
7+
```bash
8+
source ../venv/bin/activate
9+
```
10+
11+
Make sure you have the required dev dependencies installed:
12+
13+
```bash
14+
python3 -m pip install -r ../requirements-dev.txt
15+
```
416

517
We assume that your green-metrics-tool is already set up to work on your machine, as it will use your local config.yml
618
file to determine which metric providers can be utilized in the tests.
719

820
## First time setup
21+
922
run:
1023

1124
`python3 setup-test-env.py`
@@ -18,6 +31,7 @@ You will need to re-run this setup script if new metric providers are added or t
1831
significant way.
1932

2033
## Running
34+
2135
To run the tests, you need to first start the test containers, then run pytest, and afterwards stop the containers.
2236
There are a few scripts to make this easy.
2337

@@ -33,4 +47,4 @@ window run the pytest suite using `pytest`, and then stop the containers when yo
3347
Running a subset of tests using pytest is better explained within the documentation here:
3448
https://docs.pytest.org/en/7.2.x/how-to/usage.html
3549

36-
You can also do everything in one command using the `./run-tests.sh` script.
50+
You can also do everything in one command using the `./run-tests.sh` script.

0 commit comments

Comments
 (0)