File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,22 @@ class BinSubclass(Bin): ...
9191 assert get_specialized_type_var_map (Bin ) == {"_T" : int }
9292
9393
94+ def test_get_specialized_type_var_map_double_generic_passthrough ():
95+ @strawberry .type
96+ class Foo [_T ]: ...
97+
98+ @strawberry .type
99+ class Bar [_K ](Foo [_K ]): ...
100+
101+ @strawberry .type
102+ class Bin (Bar [int ]): ...
103+
104+ assert get_specialized_type_var_map (Bin ) == {
105+ "_T" : int ,
106+ "_K" : int ,
107+ }
108+
109+
94110def test_get_specialized_type_var_map_multiple_inheritance ():
95111 @strawberry .type
96112 class Foo [_T ]: ...
Original file line number Diff line number Diff line change @@ -94,6 +94,22 @@ class BinSubclass(Bin): ...
9494 assert get_specialized_type_var_map (Bin ) == {"_T" : int }
9595
9696
97+ def test_get_specialized_type_var_map_double_generic_passthrough ():
98+ @strawberry .type
99+ class Foo (Generic [_T ]): ...
100+
101+ @strawberry .type
102+ class Bar (Foo [_K ], Generic [_K ]): ...
103+
104+ @strawberry .type
105+ class Bin (Bar [int ]): ...
106+
107+ assert get_specialized_type_var_map (Bin ) == {
108+ "_T" : int ,
109+ "_K" : int ,
110+ }
111+
112+
97113def test_get_specialized_type_var_map_multiple_inheritance ():
98114 @strawberry .type
99115 class Foo (Generic [_T ]): ...
You can’t perform that action at this time.
0 commit comments