We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4136b6 commit 4057e00Copy full SHA for 4057e00
1 file changed
tests/test_build_docs_versions.py
@@ -1,5 +1,7 @@
1
from __future__ import annotations
2
3
+import logging
4
+
5
import pytest
6
7
from build_docs import Version, Versions
@@ -57,17 +59,17 @@ def test_from_json() -> None:
57
59
]
58
60
61
-def test_from_json_error() -> None:
62
+def test_from_json_warning(caplog) -> None:
63
# Arrange
64
json_data = {"2.8": {"branch": "2.8", "pep": 404, "status": "ex-release"}}
65
- # Act / Assert
- with pytest.raises(
66
- ValueError,
67
- match="Saw invalid version status 'ex-release', expected to be one of",
68
- ):
+ # Act
+ with caplog.at_level(logging.WARNING):
69
Versions.from_json(json_data)
70
+ # Assert
71
+ assert "Saw invalid version status 'ex-release', expected to be one of" in caplog.text
72
73
74
def test_current_stable(versions) -> None:
75
# Act
0 commit comments