Skip to content

Commit 17d28da

Browse files
committed
Block network during unit tests
1 parent 9e010ad commit 17d28da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ pip install -r requirements-dev.txt
3737
To run just the tests
3838

3939
```shell
40-
$ pytest -v -s --cov pystac_client --cov-report term-missing
40+
$ pytest -v -s --block-network --cov pystac_client --cov-report term-missing
4141
```
4242

4343
The pystac-client tests use [vcrpy](https://vcrpy.readthedocs.io/en/latest/) to mock API calls
@@ -46,7 +46,7 @@ function to indicate `vcrpy` should be used. Record the new responses and commit
4646
repository.
4747

4848
```shell
49-
$ pytest -v -s --record-mode new_episodes
49+
$ pytest -v -s --record-mode new_episodes --block-network
5050
$ git add <new files here>
5151
$ git commit -a -m 'new test episodes'
5252
```
@@ -55,7 +55,7 @@ To update pystac-client to use future versions of STAC API, the existing recorde
5555
should be "re-recorded":
5656

5757
```shell
58-
$ pytest -v -s --record-mode rewrite
58+
$ pytest -v -s --record-mode rewrite --block-network
5959
$ git commit -a -m 'updated test episodes'
6060
```
6161

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
3434
*.md
3535

3636
# Test suite with coverage enabled
37-
pytest -s --cov pystac_client --cov-report term-missing
37+
pytest -s --block-network --cov pystac_client --cov-report term-missing
3838
coverage xml
3939
fi
4040
fi

0 commit comments

Comments
 (0)