Skip to content

Commit bbefbbe

Browse files
committed
Merge branch 'fix/test_error_message_regex' into 'main'
fix: Error message regex in yank test See merge request espressif/idf-component-manager!534
2 parents dac5a74 + aa328e0 commit bbefbbe

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ def mock_registry(request, mock_registry_without_token, mock_storage, mock_token
245245
@skip_on_real_environment
246246
def mock_yank_404(request, monkeypatch): # noqa: ARG001
247247
def f(*_, **__):
248-
raise VersionNotFound('Version "1.2.0" of component "cmp" was not found in the registry.')
248+
raise VersionNotFound(
249+
'The version "1.2.0" of the component "test_component_manager/cmp" was not found in the registry'
250+
)
249251

250252
monkeypatch.setattr(APIClient, 'yank_version', f)
251253

tests/core/test_yank_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_yank_component_version(
4848
def test_yank_component_version_not_exists(mock_yank_404, tmp_path): # noqa: ARG001
4949
manager = ComponentManager(path=str(tmp_path))
5050
with pytest.raises(
51-
FatalError, match='Version "1.2.0" of component "cmp" was not found in the registry.'
51+
FatalError,
52+
match='The version "1.2.0" of the component "test_component_manager/cmp" was not found in the registry',
5253
):
5354
manager.yank_version('cmp', '1.2.0', 'critical test', namespace='test_component_manager')

0 commit comments

Comments
 (0)