mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-10-25 11:17:28 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			478 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			478 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| 
 | |
| def before_all(context):
 | |
|     context.endpoint = None
 | |
|     context.request_data = None
 | |
|     context.files = {}
 | |
|     context.response = None
 | |
| 
 | |
| def after_scenario(context, scenario):
 | |
|     if hasattr(context, 'files'):
 | |
|         for file in context.files.values():
 | |
|             file.close()
 | |
|     if os.path.exists('response_file'):
 | |
|         os.remove('response_file')
 | |
|     if hasattr(context, 'file_name') and os.path.exists(context.file_name):
 | |
|         os.remove(context.file_name)
 |