From 88fff1a6716d0015226d2e0c52cbcd0db1b42a6b Mon Sep 17 00:00:00 2001 From: Eduardo Blancas Date: Tue, 11 Jul 2023 21:36:19 -0600 Subject: [PATCH] adds testing shell --- src/tests/conftest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tests/conftest.py b/src/tests/conftest.py index 6200eb6f8..8539b2875 100644 --- a/src/tests/conftest.py +++ b/src/tests/conftest.py @@ -50,6 +50,19 @@ def clean_conns(): yield +# if we enable it, we'll have to update tests! +# because they expect the error not to be raised +class TestingShell(InteractiveShell): + def run_cell(self, *args, **kwargs): + result = super().run_cell(*args, **kwargs) + + if result.error_in_exec is not None: + # raise RuntimeError("a") from result.error_in_exec + raise result.error_in_exec + + return result + + @pytest.fixture def ip_empty(): c = Config()