MCPcopy
hub / github.com/httpie/cli / open_session

Function open_session

tests/test_sessions.py:559–564  ·  view source on GitHub ↗
(path: Path, env: Environment, read_only: bool = False)

Source from the content-addressed store, hash-verified

557
558@contextmanager
559def open_session(path: Path, env: Environment, read_only: bool = False) -> Iterator[Session]:
560 session = Session(path, env, session_id='test', bound_host=DUMMY_HOST)
561 session.load()
562 yield session
563 if not read_only:
564 session.save()
565
566
567@contextmanager

Calls 3

SessionClass · 0.90
saveMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected