Skip to content

Commit bc910fa

Browse files
committed
-
1 parent 824f072 commit bc910fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test_python_toolbox/test_caching/test_cached_type.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ def __init__(self, a=1, b=2, *args, **kwargs):
1414

1515
assert A() is A(1) is A(b=2) is A(1, 2) is A(1, b=2)
1616
assert A() is not A(3) is not A(b=7) is not A(1, 2, 'meow') is not A(x=9)
17+
18+
def test_keyword_only_separator_and_annotations():
19+
class B(metaclass=CachedType):
20+
def __init__(self, a: int, b: float, *, c: 'lol' = 7) -> None:
21+
pass
22+
23+
assert B(1, 2) is B(b=2, a=1, c=7) is not B(b=2, a=1, c=8)

0 commit comments

Comments
 (0)