From 799b6ea1497a754c2ab2c9904af553a555d3f13c Mon Sep 17 00:00:00 2001 From: Graeme Watt Date: Tue, 14 Nov 2023 12:59:57 +0000 Subject: [PATCH] tests: change ConnectTimeout to ConnectionError * Also add quotes to "pip install" command in README.md. --- README.md | 2 +- tests/test_resilient_requests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02ae162..2a47bdf 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/tests/test_resilient_requests.py b/tests/test_resilient_requests.py index 3c8b817..a86b31b 100644 --- a/tests/test_resilient_requests.py +++ b/tests/test_resilient_requests.py @@ -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')