Skip to content

Commit 748143a

Browse files
committed
Try to exclude branches in conftest
1 parent 1b84673 commit 748143a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

fhir/resources/R4B/tests/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def download_and_store(url, path):
4040
try:
4141
sys.stdout.write("Attempting to download from {0}\n".format(url))
4242
ret = requests.get(url)
43-
except requests.HTTPError as exc:
43+
except requests.HTTPError as exc: # pragma: no cover
4444
raise LookupError("Failed to download. Full error: {0!s}".format(exc))
4545
else:
46-
if not ret.ok:
46+
if not ret.ok: # pragma: no cover
4747
raise Exception("Failed to download {0}".format(url))
4848
with io.open(path, "wb") as handle:
4949
for chunk in ret.iter_content():
@@ -53,7 +53,7 @@ def download_and_store(url, path):
5353
)
5454

5555

56-
def expand(self, local):
56+
def expand(self, local): # pragma: no cover
5757
"""Expand the ZIP file at the given path to the cache directory."""
5858
path = os.path.join(self.cache, local)
5959
assert os.path.exists(path)
@@ -65,7 +65,7 @@ def expand(self, local):
6565

6666
@pytest.fixture(scope="session")
6767
def base_settings():
68-
if not os.path.exists(CACHE_PATH):
68+
if not os.path.exists(CACHE_PATH): # pragma: no cover
6969
os.makedirs(CACHE_PATH)
7070

7171
settings = {}

fhir/resources/tests/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def download_and_store(url, path):
3636
try:
3737
sys.stdout.write("Attempting to download from {0}\n".format(url))
3838
ret = requests.get(url)
39-
except requests.HTTPError as exc:
39+
except requests.HTTPError as exc: # pragma: no cover
4040
raise LookupError("Failed to download. Full error: {0!s}".format(exc))
4141
else:
42-
if not ret.ok:
42+
if not ret.ok: # pragma: no cover
4343
raise Exception("Failed to download {0}".format(url))
4444
with io.open(path, "wb") as handle:
4545
for chunk in ret.iter_content():
@@ -49,7 +49,7 @@ def download_and_store(url, path):
4949
)
5050

5151

52-
def expand(self, local):
52+
def expand(self, local): # pragma: no cover
5353
"""Expand the ZIP file at the given path to the cache directory."""
5454
path = os.path.join(self.cache, local)
5555
assert os.path.exists(path)
@@ -61,7 +61,7 @@ def expand(self, local):
6161

6262
@pytest.fixture(scope="session")
6363
def base_settings():
64-
if not os.path.exists(CACHE_PATH):
64+
if not os.path.exists(CACHE_PATH): # pragma: no cover
6565
os.makedirs(CACHE_PATH)
6666

6767
settings = {}

0 commit comments

Comments
 (0)