import inspect
from src import gui_2

def test_keep_pairs_input_uses_adequate_width():
 src = inspect.getsource(gui_2)
 marker = "Keep Pairs:"
 idx = src.find(marker)
 assert idx != -1, "Could not find Keep Pairs label in gui_2.py"
 snippet = src[idx:idx + 200]
 assert "set_next_item_width(80)" not in snippet, (
  "Keep Pairs input width is still 80px; digit values get clipped."
 )
 assert "set_next_item_width(140)" in snippet, (
  "Keep Pairs input should use width 140 for 2-3 digit values."
 )
 assert "drag_int" in snippet, (
  "Keep Pairs input should use drag_int for inline +/- controls."
 )
