summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_with.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-08 09:55:31 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-08 09:55:31 (GMT)
commit67b212e608044b094272248200db71af69518df9 (patch)
tree672383dd6eff6fd4c88d515288ac170bb7c0026a /Lib/test/test_with.py
parentd97b7b5158ce3149d4fc7d45a1d8af694ef3564c (diff)
downloadcpython-67b212e608044b094272248200db71af69518df9.zip
cpython-67b212e608044b094272248200db71af69518df9.tar.gz
cpython-67b212e608044b094272248200db71af69518df9.tar.bz2
Issue #10859: Make `contextlib.GeneratorContextManager` officially
private by renaming it to `_GeneratorContextManager`.
Diffstat (limited to 'Lib/test/test_with.py')
-rw-r--r--Lib/test/test_with.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py
index d6308e4..a9d374b 100644
--- a/Lib/test/test_with.py
+++ b/Lib/test/test_with.py
@@ -9,26 +9,26 @@ __email__ = "mbland at acm dot org"
import sys
import unittest
from collections import deque
-from contextlib import GeneratorContextManager, contextmanager
+from contextlib import _GeneratorContextManager, contextmanager
from test.support import run_unittest
-class MockContextManager(GeneratorContextManager):
+class MockContextManager(_GeneratorContextManager):
def __init__(self, gen):
- GeneratorContextManager.__init__(self, gen)
+ _GeneratorContextManager.__init__(self, gen)
self.enter_called = False
self.exit_called = False
self.exit_args = None
def __enter__(self):
self.enter_called = True
- return GeneratorContextManager.__enter__(self)
+ return _GeneratorContextManager.__enter__(self)
def __exit__(self, type, value, traceback):
self.exit_called = True
self.exit_args = (type, value, traceback)
- return GeneratorContextManager.__exit__(self, type,
- value, traceback)
+ return _GeneratorContextManager.__exit__(self, type,
+ value, traceback)
def mock_contextmanager(func):