mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
This commit is contained in:
parent
b4d2d31874
commit
822b87f276
4 changed files with 11 additions and 2 deletions
|
@ -9,6 +9,7 @@ import unittest
|
|||
import threading
|
||||
from contextlib import * # Tests __all__
|
||||
from test import test_support
|
||||
import warnings
|
||||
|
||||
class ContextManagerTestCase(unittest.TestCase):
|
||||
|
||||
|
@ -331,7 +332,9 @@ class LockContextTestCase(unittest.TestCase):
|
|||
|
||||
# This is needed to make the test actually run under regrtest.py!
|
||||
def test_main():
|
||||
test_support.run_unittest(__name__)
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore')
|
||||
test_support.run_unittest(__name__)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue