mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Skip test in test_socket.py if sys.getrefcount isn't available (#126640)
				
					
				
			Skip `testMakefileCloseSocketDestroy` test if `sys.getrefcount` isn't available. This is necessary for PyPy and other Python implementations that do not have `sys.getrefcount`.
This commit is contained in:
		
							parent
							
								
									160758a574
								
							
						
					
					
						commit
						0f6bb28ff3
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -5334,6 +5334,8 @@ def _testMakefileClose(self): | |||
|         self.write_file.write(self.write_msg) | ||||
|         self.write_file.flush() | ||||
| 
 | ||||
|     @unittest.skipUnless(hasattr(sys, 'getrefcount'), | ||||
|                          'test needs sys.getrefcount()') | ||||
|     def testMakefileCloseSocketDestroy(self): | ||||
|         refcount_before = sys.getrefcount(self.cli_conn) | ||||
|         self.read_file.close() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 CF Bolz-Tereick
						CF Bolz-Tereick