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

+9
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)