Skip to content

Commit

Permalink
Added asserts to check session_timer.ip.ask_exit and session_timer.ip…
Browse files Browse the repository at this point in the history
….pt_app.app.exit are called.
  • Loading branch information
janeliu-slac committed Jul 10, 2024
1 parent c6d118f commit 8a09d3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hutch_python/tests/test_ipython_session_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
@pytest.fixture(scope='function')
def fake_ipython():
fake_ipython = FakeIPython()
fake_ipython.ask_exit = lambda *args, **kwargs: None
return fake_ipython


Expand Down Expand Up @@ -49,3 +48,5 @@ def test_start_session(session_timer, fake_ipython, capsys):

captured = capsys.readouterr()
assert "timed out" in captured.out
assert session_timer.ip.ask_exit.called
assert session_timer.ip.pt_app.app.exit.called

0 comments on commit 8a09d3c

Please sign in to comment.