Skip to content

Commit

Permalink
Update test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Oct 27, 2023
1 parent bf36ecf commit 8a590d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json
from typing import Dict, List, Union, Literal, TypeVar
from typing import Dict, List, Union, Literal, TypeVar, ClassVar

from utils import FakeMessage, FakeMessageSegment
from nonebot.utils import (
Expand Down Expand Up @@ -28,6 +28,7 @@ def test_generic_check_issubclass():
assert not generic_check_issubclass(Literal[1, 2, "3"], int)
assert generic_check_issubclass(List[int], list)
assert generic_check_issubclass(Dict[str, int], dict)
assert not generic_check_issubclass(ClassVar[int], int)
assert generic_check_issubclass(TypeVar("T", int, float), (int, float))
assert generic_check_issubclass(TypeVar("T", bound=int), (int, float))

Expand Down

0 comments on commit 8a590d2

Please sign in to comment.