]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Exclude decoder's flush try..except from coverage 62/head
authorYeray Diaz Diaz <yeray.diaz@farfetch.com>
Tue, 14 May 2019 12:43:12 +0000 (13:43 +0100)
committerYeray Diaz Diaz <yeray.diaz@farfetch.com>
Tue, 14 May 2019 12:43:12 +0000 (13:43 +0100)
httpcore/decoders.py

index 6b11060eda54ee3ee9f81adb67e539cecf171538..7f3ef0db89a640c16a54e48b72573b080cfa70a6 100644 (file)
@@ -53,7 +53,7 @@ class DeflateDecoder(Decoder):
     def flush(self) -> bytes:
         try:
             return self.decompressor.flush()
-        except zlib.error as exc:
+        except zlib.error as exc:  # pragma: nocover
             raise httpcore.exceptions.DecodingError from exc
 
 
@@ -76,7 +76,7 @@ class GZipDecoder(Decoder):
     def flush(self) -> bytes:
         try:
             return self.decompressor.flush()
-        except zlib.error as exc:
+        except zlib.error as exc:  # pragma: nocover
             raise httpcore.exceptions.DecodingError from exc
 
 
@@ -103,7 +103,7 @@ class BrotliDecoder(Decoder):
         try:
             self.decompressor.finish()
             return b""
-        except brotli.Error as exc:
+        except brotli.Error as exc:  # pragma: nocover
             raise httpcore.exceptions.DecodingError from exc