(ModelTwo)
| 194 | |
| 195 | @pytest.mark.thread_unsafe(reason='`pytest.warns()` is thread unsafe') |
| 196 | def test_copy_include(ModelTwo): |
| 197 | m = ModelTwo(a=24, d=Model(a='12')) |
| 198 | m2 = deprecated_copy(m, include={'a'}) |
| 199 | |
| 200 | assert m.a == m2.a == 24 |
| 201 | assert set(m.model_dump().keys()) == {'a', 'b', 'c', 'd'} |
| 202 | assert set(m2.model_dump().keys()) == {'a'} |
| 203 | |
| 204 | assert m != m2 |
| 205 | |
| 206 | |
| 207 | @pytest.mark.thread_unsafe(reason='`pytest.warns()` is thread unsafe') |
nothing calls this directly
no test coverage detected