()
| 83 | |
| 84 | |
| 85 | def test_use_after(): |
| 86 | v = SchemaSerializer( |
| 87 | core_schema.tuple_positional_schema( |
| 88 | [ |
| 89 | core_schema.definitions_schema( |
| 90 | core_schema.definition_reference_schema('foobar'), |
| 91 | [ |
| 92 | core_schema.int_schema( |
| 93 | ref='foobar', serialization=core_schema.to_string_ser_schema(when_used='always') |
| 94 | ) |
| 95 | ], |
| 96 | ), |
| 97 | core_schema.definition_reference_schema('foobar'), |
| 98 | ] |
| 99 | ) |
| 100 | ) |
| 101 | assert v.to_python((1, 2)) == ('1', '2') |
| 102 | |
| 103 | |
| 104 | def test_defs_with_dict(): |
nothing calls this directly
no test coverage detected