mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	add boilerplate so the test modules can be run as scripts
This commit is contained in:
		
							parent
							
								
									43ea47ff06
								
							
						
					
					
						commit
						22021579a9
					
				
					 3 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
					@ -48,3 +48,6 @@ class BuildPyTestCase(support.TempdirManager, unittest.TestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_suite():
 | 
					def test_suite():
 | 
				
			||||||
    return unittest.makeSuite(BuildPyTestCase)
 | 
					    return unittest.makeSuite(BuildPyTestCase)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
					    unittest.main(defaultTest="test_suite")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,3 +72,6 @@ class BuildScriptsTestCase(support.TempdirManager, unittest.TestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_suite():
 | 
					def test_suite():
 | 
				
			||||||
    return unittest.makeSuite(BuildScriptsTestCase)
 | 
					    return unittest.makeSuite(BuildScriptsTestCase)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
					    unittest.main(defaultTest="test_suite")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,6 +70,8 @@ class InstallScriptsTestCase(support.TempdirManager, unittest.TestCase):
 | 
				
			||||||
            self.assert_(name in installed)
 | 
					            self.assert_(name in installed)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
def test_suite():
 | 
					def test_suite():
 | 
				
			||||||
    return unittest.makeSuite(InstallScriptsTestCase)
 | 
					    return unittest.makeSuite(InstallScriptsTestCase)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
					    unittest.main(defaultTest="test_suite")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue