1 parent 824f072 commit bc910faCopy full SHA for bc910fa
1 file changed
test_python_toolbox/test_caching/test_cached_type.py
@@ -14,3 +14,10 @@ def __init__(self, a=1, b=2, *args, **kwargs):
14
15
assert A() is A(1) is A(b=2) is A(1, 2) is A(1, b=2)
16
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