MCPcopy Create free account
hub / github.com/Lap-Platform/LAP / TestCompatibility

Class TestCompatibility

tests/test_differ.py:175–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174
175class TestCompatibility:
176 def test_breaking_changes_major(self):
177 result = check_compatibility(_make_spec_v1(), _make_spec_v2())
178 assert result.compatible is False
179 assert result.severity == "MAJOR"
180 assert len(result.breaking_changes) > 0
181
182 def test_identical_is_compatible(self):
183 spec = _make_spec_v1()
184 result = check_compatibility(spec, spec)
185 assert result.compatible is True
186 assert result.severity == "PATCH"
187
188 def test_minor_change(self):
189 """Adding only an optional param → MINOR."""
190 old = LAPSpec(api_name="T", endpoints=[
191 Endpoint(method="get", path="/x", required_params=[], optional_params=[],
192 request_body=[], response_schemas=[], error_schemas=[]),
193 ])
194 new = LAPSpec(api_name="T", endpoints=[
195 Endpoint(method="get", path="/x", required_params=[],
196 optional_params=[Param("foo", "str")],
197 request_body=[], response_schemas=[], error_schemas=[]),
198 ])
199 result = check_compatibility(old, new)
200 assert result.compatible is True
201 assert result.severity == "MINOR"
202
203
204class TestChangelog:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected