mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-124402: Require cpu resource in test_free_threading (#124438)
Require the 'cpu' test resource on slow test_free_threading tests.
(cherry picked from commit 38a5beb12a)
			
			
This commit is contained in:
		
							parent
							
								
									a573b23124
								
							
						
					
					
						commit
						5615351a4b
					
				
					 3 changed files with 8 additions and 0 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
| import weakref | ||||
| 
 | ||||
| from sys import monitoring | ||||
| from test import support | ||||
| from test.support import threading_helper | ||||
| from threading import Thread, _PyRLock | ||||
| from unittest import TestCase | ||||
|  | @ -43,6 +44,7 @@ def after_test(self): | |||
|         """Runs once after the test is done""" | ||||
|         pass | ||||
| 
 | ||||
|     @support.requires_resource('cpu') | ||||
|     def test_instrumentation(self): | ||||
|         # Setup a bunch of functions which will need instrumentation... | ||||
|         funcs = [] | ||||
|  | @ -218,6 +220,7 @@ def test_register_callback(self): | |||
|         for ref in self.refs: | ||||
|             self.assertEqual(ref(), None) | ||||
| 
 | ||||
|     @support.requires_resource('cpu') | ||||
|     def test_set_local_trace_opcodes(self): | ||||
|         def trace(frame, event, arg): | ||||
|             frame.f_trace_opcodes = True | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner