mirror of
				https://github.com/Thor77/TeamspeakStats.git
				synced 2025-11-03 15:22:45 -05:00 
			
		
		
		
	Make sure each test gets its own cache
by appending testfunction-name to cache_path
This commit is contained in:
		
							parent
							
								
									ab99c5f64c
								
							
						
					
					
						commit
						af608f175f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -13,7 +13,9 @@ from tsstats.tests.test_log import testlog_path
 | 
			
		|||
 | 
			
		||||
@pytest.fixture
 | 
			
		||||
def cache_path(request):
 | 
			
		||||
    cache_path = 'tsstats/tests/res/tsstats.cache'
 | 
			
		||||
    cache_path = 'tsstats/tests/res/tsstats.cache.{}'.format(
 | 
			
		||||
        request.function.__name__
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    def clean():
 | 
			
		||||
        if os.path.exists(cache_path):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue