File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,23 +13,15 @@ def test_get_model_id() -> None:
1313 Test that get_model_id behaves as expected, both at runtime and during typechecking.
1414 """
1515 my_model = MyTypedModel ()
16- related_model = RelatedTypedModel (my_model = my_model )
1716
1817 # Sanity checks
1918 assert_type (my_model , MyTypedModel )
2019 assert_type (my_model .id , MyTypedModel .ID )
21- assert_type (related_model .my_model , MyTypedModel )
22- assert_type (related_model .my_model .id , MyTypedModel .ID )
23- assert_type (related_model .my_model_id , MyTypedModel .ID )
2420
2521 # get_model_id on a model returns its id
2622 assert get_model_id (my_model ) == my_model .id
2723 assert_type (get_model_id (my_model ), MyTypedModel .ID )
28- assert get_model_id (related_model .my_model ) == my_model .id
29- assert_type (get_model_id (related_model .my_model ), MyTypedModel .ID )
3024
3125 # get_model_id on an id returns itself
3226 assert get_model_id (my_model .id ) == my_model .id
3327 assert_type (get_model_id (my_model .id ), MyTypedModel .ID )
34- assert get_model_id (related_model .my_model .id ) == my_model .id
35- assert_type (get_model_id (related_model .my_model .id ), MyTypedModel .ID )
You can’t perform that action at this time.
0 commit comments