mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.7.x] Ensured cache tests do not leak temp dirs
Refs #17215.
Backport of 1d9596025e from master.
			
			
This commit is contained in:
		
							
								
								
									
										3
									
								
								tests/cache/tests.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								tests/cache/tests.py
									
									
									
									
										vendored
									
									
								
							| @@ -1149,8 +1149,9 @@ class FileBasedCacheTests(BaseCacheTests, TestCase): | ||||
|             cache_params.update({'LOCATION': self.dirname}) | ||||
|  | ||||
|     def tearDown(self): | ||||
|         shutil.rmtree(self.dirname) | ||||
|         super(FileBasedCacheTests, self).tearDown() | ||||
|         # Call parent first, as cache.clear() may recreate cache base directory | ||||
|         shutil.rmtree(self.dirname) | ||||
|  | ||||
|     def test_ignores_non_cache_files(self): | ||||
|         fname = os.path.join(self.dirname, 'not-a-cache-file') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user