Skip to content

Commit

Permalink
Skip new tests on Python 3.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Dec 10, 2022
1 parent 419a424 commit cb8b6d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_exceptions.py
Expand Up @@ -3,6 +3,8 @@
import sys
import unittest

import pytest

from exceptiongroup import BaseExceptionGroup, ExceptionGroup


Expand Down Expand Up @@ -96,6 +98,10 @@ class MyEG(ExceptionGroup):

self.assertIs(type(MyEG("eg", [ValueError(12), TypeError(42)])), MyEG)

@pytest.mark.skipif(
sys.version_info[:3] == (3, 11, 0),
reason="Behavior was made stricter in 3.11.1",
)
def test_EG_subclass_does_not_wrap_base_exceptions(self):
class MyEG(ExceptionGroup):
pass
Expand All @@ -104,6 +110,10 @@ class MyEG(ExceptionGroup):
with self.assertRaisesRegex(TypeError, msg):
MyEG("eg", [ValueError(12), KeyboardInterrupt(42)])

@pytest.mark.skipif(
sys.version_info[:3] == (3, 11, 0),
reason="Behavior was made stricter in 3.11.1",
)
def test_BEG_and_E_subclass_does_not_wrap_base_exceptions(self):
class MyEG(BaseExceptionGroup, ValueError):
pass
Expand Down

0 comments on commit cb8b6d3

Please sign in to comment.