def test_history_file(): with tempfile.NamedTemporaryFile() as f: cfg = load_config() cfg.set('interactive', 'HISTORY_FILE', f.name) assert _setup_readline(cfg=cfg)
def test_no_config(): assert not _setup_readline()
def test_no_history_file(): cfg = load_config() cfg.set('interactive', 'HISTORY_FILE', '') assert _setup_readline(cfg=cfg)