Skip to content

Commit aaf046a

Browse files
committed
Add static type assertions to is_platform test
1 parent d54f851 commit aaf046a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/deprecation/test_compat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
import os
1212
import sys
1313

14+
if sys.version_info >= (3, 11):
15+
from typing import assert_type
16+
else:
17+
from typing_extensions import assert_type
18+
1419
import pytest
1520

1621
import git.compat
@@ -38,6 +43,10 @@ def test_is_platform() -> None:
3843
is_posix = git.compat.is_posix
3944
is_darwin = git.compat.is_darwin
4045

46+
assert_type(is_win, bool)
47+
assert_type(is_posix, bool)
48+
assert_type(is_darwin, bool)
49+
4150
messages = [str(entry.message) for entry in ctx]
4251
assert len(messages) == 3
4352

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy