generated from daniil-berg/boilerplate-py
	Initial commit
This commit is contained in:
		
							
								
								
									
										0
									
								
								tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										13
									
								
								tests/__main__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								tests/__main__.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| import sys | ||||
| import unittest | ||||
|  | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|     try: | ||||
|         pattern = sys.argv[1] | ||||
|     except IndexError: | ||||
|         pattern = "test*.py" | ||||
|     test_suite = unittest.defaultTestLoader.discover(".", pattern=pattern) | ||||
|     test_runner = unittest.TextTestRunner(resultclass=unittest.TextTestResult) | ||||
|     result = test_runner.run(test_suite) | ||||
|     sys.exit(not result.wasSuccessful()) | ||||
		Reference in New Issue
	
	Block a user