MCPcopy
hub / github.com/pytest-dev/pytest / get_session

Function get_session

scripts/update-plugin-list.py:100–105  ·  view source on GitHub ↗

Configures the requests-cache session

()

Source from the content-addressed store, hash-verified

98
99
100def get_session() -> CachedSession:
101 """Configures the requests-cache session"""
102 cache_path = platformdirs.user_cache_path("pytest-plugin-list")
103 cache_path.mkdir(exist_ok=True, parents=True)
104 cache_file = cache_path.joinpath("http_cache.sqlite3")
105 return CachedSession(backend=SQLiteCache(cache_file))
106
107
108def pytest_plugin_projects_from_pypi(session: CachedSession) -> dict[str, int]:

Callers 1

iter_pluginsFunction · 0.85

Calls 1

mkdirMethod · 0.45

Tested by

no test coverage detected