Skip to content

Commit

Permalink
another test with pragma: no cover
Browse files Browse the repository at this point in the history
  • Loading branch information
nitneuqr committed Sep 11, 2024
1 parent 79cf892 commit 99741ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/hazmat/primitives/test_aead.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ def _aead_supported(cls):

def large_mmap(length: int = 2**32):
# Silencing mypy warning on Windows, even though mmap doesn't exist there.
return mmap.mmap(-1, length, prot=mmap.PROT_READ) # type: ignore
# See: https://mypy.readthedocs.io/en/stable/common_issues.html#version-and-platform-checks
if sys.platform != "win32":
return mmap.mmap(-1, length, prot=mmap.PROT_READ)
else:
return mmap.mmap(-1, length) # pragma: no cover


@pytest.mark.skipif(
Expand Down

0 comments on commit 99741ab

Please sign in to comment.