saltbundlepy-exceptiongroup/skip-test_catch_handler_raises-for-older-311.patch

32 lines
876 B
Diff

From 452ba0946347b4e0df950763213f162704bc1eed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
Date: Wed, 5 Jul 2023 12:28:15 +0300
Subject: [PATCH] Skip test_catch_handler_raises() on Python 3.11 if the Python
version is too low
---
tests/test_catch_py311.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/test_catch_py311.py b/tests/test_catch_py311.py
index 4351be8..5880f0a 100644
--- a/tests/test_catch_py311.py
+++ b/tests/test_catch_py311.py
@@ -1,3 +1,5 @@
+import sys
+
import pytest
from exceptiongroup import ExceptionGroup
@@ -121,6 +123,10 @@ def test_catch_full_match():
pass
+@pytest.mark.skipif(
+ sys.version_info < (3, 11, 4),
+ reason="Behavior was changed in 3.11.4",
+)
def test_catch_handler_raises():
with pytest.raises(RuntimeError, match="new"):
try: