Skip to content

Commit 7b7d54f

Browse files
committed
chore: fix coverage issue on PyPy 3.8
1 parent f15ad1d commit 7b7d54f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/xz/file.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from io import SEEK_CUR, SEEK_END
22
import os
3+
import sys
34
from typing import BinaryIO, List, Optional, cast
45
import warnings
56

@@ -144,6 +145,10 @@ def close(self) -> None:
144145
finally:
145146
if self._close_fileobj:
146147
self.fileobj.close() # self.fileobj exists at this point
148+
if sys.version_info < (3, 10): # pragma: no cover
149+
# fix coverage issue on some Python versions
150+
# see https://github.com/nedbat/coveragepy/issues/1480
151+
pass
147152

148153
@property
149154
def stream_boundaries(self) -> List[int]:

0 commit comments

Comments
 (0)