23 lines
429 B
Python
23 lines
429 B
Python
"""PtyManager 테스트."""
|
|
|
|
import pytest
|
|
|
|
from lazy_enter.pty_manager import PtyManager
|
|
|
|
|
|
def test_initial_state():
|
|
pty = PtyManager("echo hello")
|
|
assert not pty.is_alive
|
|
|
|
|
|
def test_start_and_stop():
|
|
pty = PtyManager("cat")
|
|
try:
|
|
pty.start()
|
|
except OSError as exc:
|
|
pytest.skip(f"PTY unavailable in this environment: {exc}")
|
|
|
|
assert pty.is_alive
|
|
pty.stop()
|
|
assert not pty.is_alive
|