8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a71b9c commit 7402c3cCopy full SHA for 7402c3c
larray_eurostat/tests/test_tsv.py
@@ -1,13 +1,14 @@
1
import re
2
+from urllib.error import HTTPError
3
4
import pytest
5
-from larray_eurostat.tsv import eurostat_get, EUROSTAT_BASEURL
6
+from larray_eurostat.tsv import eurostat_get
7
8
9
def test_eurostat_get_bad_dataset():
- dataset = 'nama_aux_cra'
10
+ dataset = 'does-not-exist'
11
- msg = f"Not a gzipped file (b'<!')\nCan't open file {EUROSTAT_BASEURL}data/{dataset}.tsv.gz"
12
- with pytest.raises(OSError, match=f'^{re.escape(msg)}$'):
+ msg = "HTTP Error 404: Not Found"
13
+ with pytest.raises(HTTPError, match=f'^{re.escape(msg)}$'):
14
eurostat_get(dataset)
0 commit comments