Update test_contextlib.py to 3.14.4 (#7815)

This commit is contained in:
Shahar Naveh authored and GitHub committed 2026-05-12 00:40:32 +09:00
1 parent 3420ec94c1
commit 1ce29cb763
1 file changed
+5 -6
+5 -6
View File
@@ -48,23 +48,23 @@ class TestAbstractContextManager(unittest.TestCase):
def __exit__(self, exc_type, exc_value, traceback):
return None
self.assertTrue(issubclass(ManagerFromScratch, AbstractContextManager))
self.assertIsSubclass(ManagerFromScratch, AbstractContextManager)
class DefaultEnter(AbstractContextManager):
def __exit__(self, *args):
super().__exit__(*args)
self.assertTrue(issubclass(DefaultEnter, AbstractContextManager))
self.assertIsSubclass(DefaultEnter, AbstractContextManager)
class NoEnter(ManagerFromScratch):
__enter__ = None
self.assertFalse(issubclass(NoEnter, AbstractContextManager))
self.assertNotIsSubclass(NoEnter, AbstractContextManager)
class NoExit(ManagerFromScratch):
__exit__ = None
self.assertFalse(issubclass(NoExit, AbstractContextManager))
self.assertNotIsSubclass(NoExit, AbstractContextManager)
class ContextManagerTestCase(unittest.TestCase):
@@ -1014,8 +1014,7 @@ class TestBaseExitStack:
else:
self.fail("Expected KeyError, but no exception was raised")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON
def test_exit_exception_with_correct_context(self):
# http://bugs.python.org/issue20317
@contextmanager