capture: do not set logging.raiseExceptions = False
Ref: https://github.com/pytest-dev/pytest/issues/4942
This commit is contained in:
		
							parent
							
								
									407d74be27
								
							
						
					
					
						commit
						08ded2927a
					
				|  | @ -0,0 +1 @@ | ||||||
|  | ``logging.raiseExceptions`` is not set to ``False`` anymore. | ||||||
|  | @ -56,13 +56,6 @@ def pytest_load_initial_conftests(early_config, parser, args): | ||||||
|     # make sure that capturemanager is properly reset at final shutdown |     # make sure that capturemanager is properly reset at final shutdown | ||||||
|     early_config.add_cleanup(capman.stop_global_capturing) |     early_config.add_cleanup(capman.stop_global_capturing) | ||||||
| 
 | 
 | ||||||
|     # make sure logging does not raise exceptions at the end |  | ||||||
|     def silence_logging_at_shutdown(): |  | ||||||
|         if "logging" in sys.modules: |  | ||||||
|             sys.modules["logging"].raiseExceptions = False |  | ||||||
| 
 |  | ||||||
|     early_config.add_cleanup(silence_logging_at_shutdown) |  | ||||||
| 
 |  | ||||||
|     # finally trigger conftest loading but while capturing (issue93) |     # finally trigger conftest loading but while capturing (issue93) | ||||||
|     capman.start_global_capturing() |     capman.start_global_capturing() | ||||||
|     outcome = yield |     outcome = yield | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue