minor: check_interactive_exception: use Skipped
This commit is contained in:
		
							parent
							
								
									db34bf01b6
								
							
						
					
					
						commit
						7538aa7bb9
					
				|  | @ -7,6 +7,7 @@ import sys | ||||||
| 
 | 
 | ||||||
| import six | import six | ||||||
| 
 | 
 | ||||||
|  | import pytest | ||||||
| from _pytest import python | from _pytest import python | ||||||
| from _pytest import runner | from _pytest import runner | ||||||
| from _pytest import unittest | from _pytest import unittest | ||||||
|  | @ -26,7 +27,7 @@ def pytest_runtest_makereport(item, call): | ||||||
|     if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()): |     if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()): | ||||||
|         # let's substitute the excinfo with a pytest.skip one |         # let's substitute the excinfo with a pytest.skip one | ||||||
|         call2 = runner.CallInfo.from_call( |         call2 = runner.CallInfo.from_call( | ||||||
|             lambda: runner.skip(six.text_type(call.excinfo.value)), call.when |             lambda: pytest.skip(six.text_type(call.excinfo.value)), call.when | ||||||
|         ) |         ) | ||||||
|         call.excinfo = call2.excinfo |         call.excinfo = call2.excinfo | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -16,7 +16,6 @@ from .reports import CollectReport | ||||||
| from .reports import TestReport | from .reports import TestReport | ||||||
| from _pytest._code.code import ExceptionInfo | from _pytest._code.code import ExceptionInfo | ||||||
| from _pytest.outcomes import Exit | from _pytest.outcomes import Exit | ||||||
| from _pytest.outcomes import skip |  | ||||||
| from _pytest.outcomes import Skipped | from _pytest.outcomes import Skipped | ||||||
| from _pytest.outcomes import TEST_OUTCOME | from _pytest.outcomes import TEST_OUTCOME | ||||||
| 
 | 
 | ||||||
|  | @ -183,7 +182,7 @@ def call_and_report(item, when, log=True, **kwds): | ||||||
| def check_interactive_exception(call, report): | def check_interactive_exception(call, report): | ||||||
|     return call.excinfo and not ( |     return call.excinfo and not ( | ||||||
|         hasattr(report, "wasxfail") |         hasattr(report, "wasxfail") | ||||||
|         or call.excinfo.errisinstance(skip.Exception) |         or call.excinfo.errisinstance(Skipped) | ||||||
|         or call.excinfo.errisinstance(bdb.BdbQuit) |         or call.excinfo.errisinstance(bdb.BdbQuit) | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue