Skip to content

Commit

Permalink
tests: change ConnectTimeout to ConnectionError
Browse files Browse the repository at this point in the history
* Also add quotes to "pip install" command in README.md.
  • Loading branch information
GraemeWatt committed Nov 14, 2023
1 parent 39b3891 commit 799b6ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $ git clone https://github.com/HEPData/hepdata-cli.git
$ cd hepdata-cli
$ python3 -m venv ~/venv/hepdata-cli
$ source ~/venv/hepdata-cli/bin/activate
(hepdata-cli) $ pip install -e .[tests]
(hepdata-cli) $ pip install -e '.[tests]'
(hepdata-cli) $ hepdata-cli --help
(hepdata-cli) $ pytest --cov=hepdata_cli
```
Expand Down
2 changes: 1 addition & 1 deletion tests/test_resilient_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def test_timeout():
adapter = TimeoutHTTPAdapter(max_retries=retry_strategy, timeout=0.0001)
with requests.Session() as session:
session.mount("https://", adapter)
with pytest.raises(requests.exceptions.ConnectTimeout):
with pytest.raises(requests.exceptions.ConnectionError):
session.get(SITE_URL + '/ping')

0 comments on commit 799b6ea

Please sign in to comment.