(repeat, test_data: TestData)
| 175 | |
| 176 | @pytest.mark.parametrize("test_data", test_cases.messages_with_json, indirect=True) |
| 177 | def test_message_json(repeat, test_data: TestData) -> None: |
| 178 | plugin_module, _, json_data = test_data |
| 179 | |
| 180 | for _ in range(repeat): |
| 181 | for sample in json_data: |
| 182 | if sample.belongs_to(test_input_config.non_symmetrical_json): |
| 183 | continue |
| 184 | |
| 185 | message: betterproto.Message = plugin_module.Test() |
| 186 | |
| 187 | message.from_json(sample.json) |
| 188 | message_json = message.to_json(0) |
| 189 | |
| 190 | assert dict_replace_nans(json.loads(message_json)) == dict_replace_nans( |
| 191 | json.loads(sample.json) |
| 192 | ) |
| 193 | |
| 194 | |
| 195 | @pytest.mark.parametrize("test_data", test_cases.services, indirect=True) |
nothing calls this directly
no test coverage detected