mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Issue #18935: Fix test_regrtest.test_timeout when built --without-threads (the
'--timeout' option requires faulthandler.dump_traceback_later).
This commit is contained in:
		
							parent
							
								
									9437d7a7fe
								
							
						
					
					
						commit
						833bf1fcb2
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -3,6 +3,7 @@
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import argparse
 | 
					import argparse
 | 
				
			||||||
 | 
					import faulthandler
 | 
				
			||||||
import getopt
 | 
					import getopt
 | 
				
			||||||
import os.path
 | 
					import os.path
 | 
				
			||||||
import unittest
 | 
					import unittest
 | 
				
			||||||
| 
						 | 
					@ -25,6 +26,8 @@ def test_help(self):
 | 
				
			||||||
                    regrtest._parse_args([opt])
 | 
					                    regrtest._parse_args([opt])
 | 
				
			||||||
                self.assertIn('Run Python regression tests.', out.getvalue())
 | 
					                self.assertIn('Run Python regression tests.', out.getvalue())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @unittest.skipUnless(hasattr(faulthandler, 'dump_traceback_later'),
 | 
				
			||||||
 | 
					                         "faulthandler.dump_traceback_later() required")
 | 
				
			||||||
    def test_timeout(self):
 | 
					    def test_timeout(self):
 | 
				
			||||||
        ns = regrtest._parse_args(['--timeout', '4.2'])
 | 
					        ns = regrtest._parse_args(['--timeout', '4.2'])
 | 
				
			||||||
        self.assertEqual(ns.timeout, 4.2)
 | 
					        self.assertEqual(ns.timeout, 4.2)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue