summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_enum.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-05-27 22:10:27 (GMT)
committerGitHub <noreply@github.com>2020-05-27 22:10:27 (GMT)
commite80697d687b610bd7fb9104af905dec8f0bc55a7 (patch)
treec848b98eaec2d959237fda725cf47b059f34b12a /Lib/test/test_enum.py
parent7d80b35af1ee03834ae4af83e920dee89c2bc273 (diff)
downloadcpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.zip
cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.gz
cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.bz2
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
Diffstat (limited to 'Lib/test/test_enum.py')
-rw-r--r--Lib/test/test_enum.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index 1df0313..e7bad62 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -10,6 +10,7 @@ from io import StringIO
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
from test import support
from test.support import ALWAYS_EQ
+from test.support import threading_helper
from datetime import timedelta
@@ -2333,7 +2334,7 @@ class TestFlag(unittest.TestCase):
self.assertEqual(Color.ALL.value, 7)
self.assertEqual(str(Color.BLUE), 'blue')
- @support.reap_threads
+ @threading_helper.reap_threads
def test_unique_composite(self):
# override __eq__ to be identity only
class TestFlag(Flag):
@@ -2363,7 +2364,7 @@ class TestFlag(unittest.TestCase):
threading.Thread(target=cycle_enum)
for _ in range(8)
]
- with support.start_threads(threads):
+ with threading_helper.start_threads(threads):
pass
# check that only 248 members were created
self.assertFalse(
@@ -2751,7 +2752,7 @@ class TestIntFlag(unittest.TestCase):
self.assertEqual(Color.ALL.value, 7)
self.assertEqual(str(Color.BLUE), 'blue')
- @support.reap_threads
+ @threading_helper.reap_threads
def test_unique_composite(self):
# override __eq__ to be identity only
class TestFlag(IntFlag):
@@ -2781,7 +2782,7 @@ class TestIntFlag(unittest.TestCase):
threading.Thread(target=cycle_enum)
for _ in range(8)
]
- with support.start_threads(threads):
+ with threading_helper.start_threads(threads):
pass
# check that only 248 members were created
self.assertFalse(