parent
							
								
									9d1ae0a149
								
							
						
					
					
						commit
						25d2cc4604
					
				|  | @ -186,8 +186,20 @@ def pytest_configure(config): | ||||||
| 
 | 
 | ||||||
| @pytest.fixture | @pytest.fixture | ||||||
| def cache(request): | def cache(request): | ||||||
|  |     """ | ||||||
|  |     Return a cache object that can persist state between testing sessions. | ||||||
|  | 
 | ||||||
|  |     cache.get(key, default) | ||||||
|  |     cache.set(key, value) | ||||||
|  | 
 | ||||||
|  |     Keys must be strings not containing a "/" separator. Add a unique identifier | ||||||
|  |     (such as plugin/app name) to avoid clashes with other cache users. | ||||||
|  | 
 | ||||||
|  |     Values can be any object handled by the json stdlib module. | ||||||
|  |     """ | ||||||
|     return request.config.cache |     return request.config.cache | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| def pytest_report_header(config): | def pytest_report_header(config): | ||||||
|     if config.option.verbose: |     if config.option.verbose: | ||||||
|         relpath = py.path.local().bestrelpath(config.cache._cachedir) |         relpath = py.path.local().bestrelpath(config.cache._cachedir) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue