| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -195,9 +195,10 @@ async def wait_closed(self, obj): | |||
| 195 | 195 | except (BrokenPipeError, ConnectionError): | |
| 196 | 196 | pass | |
| 197 | 197 | ||
| 198 | - def test_create_server_ssl_1(self): | ||
| 198 | + @support.bigmemtest(size=25, memuse=90*2**20, dry_run=False) | ||
| 199 | + def test_create_server_ssl_1(self, size): | ||
| 199 | 200 | CNT = 0 # number of clients that were successful | |
| 200 | - TOTAL_CNT = 25 # total number of clients that test will create | ||
| 201 | + TOTAL_CNT = size # total number of clients that test will create | ||
| 201 | 202 | TIMEOUT = support.LONG_TIMEOUT # timeout for this test | |
| 202 | 203 | ||
| 203 | 204 | A_DATA = b'A' * 1024 * BUF_MULTIPLIER | |
@@ -1038,9 +1039,10 @@ async def run_main(): | |||
| 1038 | 1039 | ||
| 1039 | 1040 | self.loop.run_until_complete(run_main()) | |
| 1040 | 1041 | ||
| 1041 | - def test_create_server_ssl_over_ssl(self): | ||
| 1042 | + @support.bigmemtest(size=25, memuse=90*2**20, dry_run=False) | ||
| 1043 | + def test_create_server_ssl_over_ssl(self, size): | ||
| 1042 | 1044 | CNT = 0 # number of clients that were successful | |
| 1043 | - TOTAL_CNT = 25 # total number of clients that test will create | ||
| 1045 | + TOTAL_CNT = size # total number of clients that test will create | ||
| 1044 | 1046 | TIMEOUT = support.LONG_TIMEOUT # timeout for this test | |
| 1045 | 1047 | ||
| 1046 | 1048 | A_DATA = b'A' * 1024 * BUF_MULTIPLIER | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,10 +135,12 @@ def check_parallel_module_init(self, mock_os): | |||
| 135 | 135 | if verbose: | |
| 136 | 136 | print("OK.") | |
| 137 | 137 | ||
| 138 | - def test_parallel_module_init(self): | ||
| 138 | + @support.bigmemtest(size=50, memuse=76*2**20, dry_run=False) | ||
| 139 | + def test_parallel_module_init(self, size): | ||
| 139 | 140 | self.check_parallel_module_init() | |
| 140 | 141 | ||
| 141 | - def test_parallel_meta_path(self): | ||
| 142 | + @support.bigmemtest(size=50, memuse=76*2**20, dry_run=False) | ||
| 143 | + def test_parallel_meta_path(self, size): | ||
| 142 | 144 | finder = Finder() | |
| 143 | 145 | sys.meta_path.insert(0, finder) | |
| 144 | 146 | try: | |
@@ -148,7 +150,8 @@ def test_parallel_meta_path(self): | |||
| 148 | 150 | finally: | |
| 149 | 151 | sys.meta_path.remove(finder) | |
| 150 | 152 | ||
| 151 | - def test_parallel_path_hooks(self): | ||
| 153 | + @support.bigmemtest(size=50, memuse=76*2**20, dry_run=False) | ||
| 154 | + def test_parallel_path_hooks(self, size): | ||
| 152 | 155 | # Here the Finder instance is only used to check concurrent calls | |
| 153 | 156 | # to path_hook(). | |
| 154 | 157 | finder = Finder() | |
@@ -242,13 +245,15 @@ def target(): | |||
| 242 | 245 | __import__(TESTFN) | |
| 243 | 246 | del sys.modules[TESTFN] | |
| 244 | 247 | ||
| 245 | - def test_concurrent_futures_circular_import(self): | ||
| 248 | + @support.bigmemtest(size=1, memuse=1.8*2**30, dry_run=False) | ||
| 249 | + def test_concurrent_futures_circular_import(self, size): | ||
| 246 | 250 | # Regression test for bpo-43515 | |
| 247 | 251 | fn = os.path.join(os.path.dirname(__file__), | |
| 248 | 252 | 'partial', 'cfimport.py') | |
| 249 | 253 | script_helper.assert_python_ok(fn) | |
| 250 | 254 | ||
| 251 | - def test_multiprocessing_pool_circular_import(self): | ||
| 255 | + @support.bigmemtest(size=1, memuse=1.8*2**30, dry_run=False) | ||
| 256 | + def test_multiprocessing_pool_circular_import(self, size): | ||
| 252 | 257 | # Regression test for bpo-41567 | |
| 253 | 258 | fn = os.path.join(os.path.dirname(__file__), | |
| 254 | 259 | 'partial', 'pool_in_threads.py') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | 16 | import tempfile | |
| 17 | 17 | ||
| 18 | + from test import support | ||
| 18 | 19 | from test.support import threading_helper | |
| 19 | 20 | import unittest | |
| 20 | 21 | import io | |
@@ -49,7 +50,8 @@ def run(self): | |||
| 49 | 50 | ||
| 50 | 51 | ||
| 51 | 52 | class ThreadedTempFileTest(unittest.TestCase): | |
| 52 | - def test_main(self): | ||
| 53 | + @support.bigmemtest(size=NUM_THREADS, memuse=60*2**20, dry_run=False) | ||
| 54 | + def test_main(self, size): | ||
| 53 | 55 | threads = [TempFileGreedy() for i in range(NUM_THREADS)] | |
| 54 | 56 | with threading_helper.start_threads(threads, startEvent.set): | |
| 55 | 57 | pass | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -526,7 +526,8 @@ def test_enumerate_after_join(self): | |||
| 526 | 526 | finally: | |
| 527 | 527 | sys.setswitchinterval(old_interval) | |
| 528 | 528 | ||
| 529 | - def test_join_from_multiple_threads(self): | ||
| 529 | + @support.bigmemtest(size=20, memuse=72*2**20, dry_run=False) | ||
| 530 | + def test_join_from_multiple_threads(self, size): | ||
| 530 | 531 | # Thread.join() should be thread-safe | |
| 531 | 532 | errors = [] | |
| 532 | 533 | ||
@@ -1427,7 +1428,8 @@ def worker(): | |||
| 1427 | 1428 | self._run_and_join(script) | |
| 1428 | 1429 | ||
| 1429 | 1430 | @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug") | |
| 1430 | - def test_4_daemon_threads(self): | ||
| 1431 | + @support.bigmemtest(size=40, memuse=70*2**20, dry_run=False) | ||
| 1432 | + def test_4_daemon_threads(self, size): | ||
| 1431 | 1433 | # Check that a daemon thread cannot crash the interpreter on shutdown | |
| 1432 | 1434 | # by manipulating internal structures that are being disposed of in | |
| 1433 | 1435 | # the main thread. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments