Organized

This commit is contained in:
Jason Thistlethwaite
2026-10-17 20:50:35 -04:00
parent bd26c8894f
commit 9ee9eb3ec6
130 changed files with 24172 additions and 140 deletions
+28
View File
@@ -0,0 +1,28 @@
"""Curses launch must fail clearly outside a real terminal."""
from __future__ import annotations
from pathlib import Path
import redmine_ticket_tui
def test_tui_refuses_non_tty_with_clear_message(monkeypatch, capsys):
class Args:
cache_dir = Path("/tmp/redmine-cache")
project = "customer-service"
base_url = "https://rm.ldrprep.com"
allow_prod_writes = False
apply = False
class Cache:
cache_dir = Args.cache_dir
project = Args.project
monkeypatch.setattr(redmine_ticket_tui.os, "isatty", lambda _fd: False)
rc = redmine_ticket_tui.main_cli(Args(), Cache())
captured = capsys.readouterr()
assert rc == 1
assert "requires an interactive terminal" in captured.err