Skip to content

Commit 19fc19a

Browse files
committed
Fix display tests
1 parent 900b1a4 commit 19fc19a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/unit/test_display.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def _make_record(level: int, msg: str) -> logging.LogRecord:
9292
def reset_state(monkeypatch):
9393
"""Reset all module-level display state before every test."""
9494
monkeypatch.setattr(_vmod, '_display_initialized', False)
95+
monkeypatch.setattr(_vmod, '_prev_display_snapshot', None)
9596
monkeypatch.setattr(_vmod, 'vlink', _MockVlink(), raising=False)
9697
_vmod._log_handler.buffer.clear()
9798
ss = _vmod.shared_state
@@ -256,11 +257,13 @@ def test_first_render_no_home_escape(self, capsys):
256257
def test_subsequent_render_uses_home_escape(self, capsys):
257258
_vmod.display_thread_states()
258259
capsys.readouterr()
260+
_vmod.shared_state.rtiStatus = True
259261
assert '\033[H' in _render(capsys)
260262

261263
def test_subsequent_render_erases_each_line(self, capsys):
262264
_vmod.display_thread_states()
263265
capsys.readouterr()
266+
_vmod.shared_state.rtiStatus = True
264267
second = _render(capsys)
265268
after_home = second.split('\033[H', 1)[1]
266269
assert '\033[K' in after_home

0 commit comments

Comments
 (0)