oct
Loading...
Searching...
No Matches
oct.testing.cache._CacheRun Class Reference
Collaboration diagram for oct.testing.cache._CacheRun:
[legend]

Public Member Functions

None __init__ (self, Any config)
None prepare (self)
CacheDecision decision (self)
CacheStore|None store (self)
None record (self, Any terminalreporter)

Public Attributes

 config = config
 root = Path(str(config.rootpath))
 is_worker = hasattr(config, "workerinput")
 clearing
str enabled = "1"

Protected Member Functions

Path|None _manifest_path (self)
tuple[Path,...] _workspace_roots (self)
tuple[str,...] _in_scope (self, tuple[str,...] paths)
tuple[str,...] _candidates (self, ParallelManifest manifest)

Protected Attributes

CacheDecision|None _decision = None
CacheStore|None _store = None
bool _prepared = False

Detailed Description

The cache's state for one pytest session.

Definition at line 1195 of file cache.py.

Constructor & Destructor Documentation

◆ __init__()

None oct.testing.cache._CacheRun.__init__ ( self,
Any config )

Definition at line 1198 of file cache.py.

Member Function Documentation

◆ _candidates()

tuple[str, ...] oct.testing.cache._CacheRun._candidates ( self,
ParallelManifest manifest )
protected
Eligible files this invocation's arguments actually reach.

Definition at line 1257 of file cache.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _in_scope()

tuple[str, ...] oct.testing.cache._CacheRun._in_scope ( self,
tuple[str, ...] paths )
protected
Paths this invocation's arguments actually reach.

Definition at line 1237 of file cache.py.

Here is the caller graph for this function:

◆ _manifest_path()

Path | None oct.testing.cache._CacheRun._manifest_path ( self)
protected
The classification to read: pinned, else discovered.

Definition at line 1213 of file cache.py.

Here is the caller graph for this function:

◆ _workspace_roots()

tuple[Path, ...] oct.testing.cache._CacheRun._workspace_roots ( self)
protected
The subproject roots the key treats as first party.

Definition at line 1222 of file cache.py.

Here is the caller graph for this function:

◆ decision()

CacheDecision oct.testing.cache._CacheRun.decision ( self)
This run's decision, computed once.

Definition at line 1307 of file cache.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare()

None oct.testing.cache._CacheRun.prepare ( self)
Load the manifest and the store, and take the decision.

A run that was not asked for the cache does NOTHING here: it
loads no manifest, opens no store and builds no key. Being off
has to be free, or every uncached suite - every gate run -
would pay for a mechanism it never consults.

Definition at line 1261 of file cache.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ record()

None oct.testing.cache._CacheRun.record ( self,
Any terminalreporter )
Write the store from what the run actually reported (P2).

Definition at line 1320 of file cache.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ store()

CacheStore | None oct.testing.cache._CacheRun.store ( self)
This run's store, or None when there is no classification.

Definition at line 1314 of file cache.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _decision

CacheDecision | None oct.testing.cache._CacheRun._decision = None
protected

Definition at line 1208 of file cache.py.

◆ _prepared

bool oct.testing.cache._CacheRun._prepared = False
protected

Definition at line 1210 of file cache.py.

◆ _store

CacheStore | None oct.testing.cache._CacheRun._store = None
protected

Definition at line 1209 of file cache.py.

◆ clearing

oct.testing.cache._CacheRun.clearing
Initial value:
= bool(
config.getoption(CACHE_CLEAR_OPTION, default=False),
)

Definition at line 1202 of file cache.py.

◆ config

oct.testing.cache._CacheRun.config = config

Definition at line 1199 of file cache.py.

◆ enabled

str oct.testing.cache._CacheRun.enabled = "1"

Definition at line 1205 of file cache.py.

◆ is_worker

oct.testing.cache._CacheRun.is_worker = hasattr(config, "workerinput")

Definition at line 1201 of file cache.py.

◆ root

oct.testing.cache._CacheRun.root = Path(str(config.rootpath))

Definition at line 1200 of file cache.py.


The documentation for this class was generated from the following file:
  • G:/PythonApps/option_c/oct/oct/testing/cache.py