| 1 |
skip the failing test if and only if towncrier's version major number is greater than 24 |
| 2 |
Index: sphinxcontrib-towncrier/tests/_towncrier_test.py |
| 3 |
=================================================================== |
| 4 |
--- sphinxcontrib-towncrier.orig/tests/_towncrier_test.py |
| 5 |
+++ sphinxcontrib-towncrier/tests/_towncrier_test.py |
| 6 |
@@ -8,7 +8,11 @@ import pytest |
| 7 |
|
| 8 |
from sphinxcontrib.towncrier._towncrier import get_towncrier_config |
| 9 |
from ._compat import TowncrierConfigError |
| 10 |
+from importlib.metadata import version |
| 11 |
+from packaging.version import Version |
| 12 |
|
| 13 |
[email protected](Version(version('towncrier')).release[0] > 24, |
| 14 |
+ reason="this test is broken with towncrier v. 25.8.0") |
| 15 |
|
| 16 |
def test_towncrier_config_section_missing( |
| 17 |
monkeypatch: pytest.MonkeyPatch, |