oct
Loading...
Searching...
No Matches
parallel.py File Reference

Go to the source code of this file.

Classes

class  oct.testing.parallel.FileEntry
class  oct.testing.parallel.ParallelManifest
class  oct.testing.parallel.ModuleAnalysis
class  oct.testing.parallel._StaticDetector
class  oct.testing.parallel._Tracer

Namespaces

namespace  oct
namespace  oct.testing
namespace  oct.testing.parallel

Functions

str oct.testing.parallel.keyed (str family, str key)
str oct.testing.parallel.resource_family (str resource)
str|None oct.testing.parallel.resource_key (str resource)
bool oct.testing.parallel.conflicts_with (str left, str right)
bool oct.testing.parallel.is_conflicting (str resource)
bool oct.testing.parallel.is_known_resource (str resource)
str oct.testing.parallel.unknown (str detail)
str oct.testing.parallel.resource_for_path_hint (str hint)
str|None oct.testing.parallel.path_key (str hint)
str oct.testing.parallel.write_resource (str hint, str|None key)
str|None oct.testing.parallel.launch_family (Any argv)
frozenset[str] oct.testing.parallel.launch_resources (Any argv)
set[str] oct.testing.parallel._target_names (ast.AST node)
bool oct.testing.parallel._is_tmp_expr (ast.AST|None node, frozenset[str] tainted)
tuple[bool, bool] oct.testing.parallel._fixture_decorated (ast.AST node)
bool oct.testing.parallel._returns_tmp (ast.AST node, frozenset[str] tainted)
frozenset[str] oct.testing.parallel._collect_taint (ast.AST tree, Iterable[str] seeds)
Iterable[ast.AST] oct.testing.parallel._scope_nodes (ast.AST tree)
bool oct.testing.parallel._proven_tmp_expr (ast.AST|None node, frozenset[str] tainted)
frozenset[str] oct.testing.parallel._scope_proofs (ast.AST tree, Iterable[str] seeds, *, Iterable[str] parameters=())
set[str] oct.testing.parallel._parameter_names (ast.FunctionDef|ast.AsyncFunctionDef node)
dict[ast.AST, frozenset[str]] oct.testing.parallel._helper_parameter_taints (ast.Module tree, frozenset[str] base, Iterable[str] seeds=())
list[ast.Call] oct.testing.parallel._closed_helper_calls (ast.Module tree, ast.FunctionDef|ast.AsyncFunctionDef helper, Mapping[ast.AST, ast.AST] parents)
ast.AST|None oct.testing.parallel._helper_actual (ast.FunctionDef|ast.AsyncFunctionDef helper, ast.Call call, str name)
set[str] oct.testing.parallel._rebound_parameters (ast.AST tree, set[str] names)
dict[str, str] oct.testing.parallel._import_hints (ast.AST tree)
str|None oct.testing.parallel._hint_for_dotted (str dotted)
str oct.testing.parallel._string_hint (ast.AST|None node)
bool oct.testing.parallel._is_absolute_literal (str text)
str oct.testing.parallel._join_literal (str left, str right)
str|None oct.testing.parallel._parent_literal (str text)
bool oct.testing.parallel._is_pid_expr (ast.AST|None node)
str|None oct.testing.parallel._literal_fstring (ast.JoinedStr node)
bool oct.testing.parallel._is_os_path_join (ast.AST func)
str|None oct.testing.parallel._literal_parents_index (ast.Subscript node, Mapping[str, str] constants)
str|None oct.testing.parallel._literal_path (ast.AST|None node, Mapping[str, str]|None constants=None)
str|None oct.testing.parallel._literal_sequence (ast.Call node, Mapping[str, str] constants, *, Callable[[str, str], str] joiner)
dict[str, int] oct.testing.parallel._binding_counts (ast.AST tree)
dict[str, str] oct.testing.parallel._module_constants (ast.Module tree, str|None module_path)
str|None oct.testing.parallel._argv_element (ast.AST node)
list[str|None]|None oct.testing.parallel._literal_argv (ast.Call node, str attr)
bool oct.testing.parallel._write_mode (ast.Call node)
bool oct.testing.parallel._is_path_replace (ast.Call node)
bool oct.testing.parallel._is_environ (ast.AST|None node)
frozenset[str] oct.testing.parallel._requested_names (ast.AST tree)
ModuleAnalysis oct.testing.parallel.analyse_source (str source, *, str filename="<test>", Iterable[str] tmp_seeds=())
frozenset[str] oct.testing.parallel.classify_source (str source, *, str filename="<test>", Sequence[ModuleAnalysis] conftests=())
str oct.testing.parallel._read (Path path)
list[ModuleAnalysis] oct.testing.parallel._conftest_chain (Path root, Path path, dict[Path, ModuleAnalysis] cache)
dict[str, frozenset[str]] oct.testing.parallel.classify_tree (Path root, Sequence[str] test_roots, *, str pattern="test_*.py")
str oct.testing.parallel._find (dict[str, str] parent, str path)
None oct.testing.parallel._union (dict[str, str] parent, str left, str right)
str oct.testing.parallel._slug (str resource)
list[tuple[str, list[str]]] oct.testing.parallel._named_components (Mapping[str, list[str]] components, Mapping[str, frozenset[str]] sets)
dict[str, str] oct.testing.parallel.build_groups (Mapping[str, Iterable[str]] classified, *, Mapping[str, str]|None pins=None)
dict[str, Any] oct.testing.parallel.build_manifest (Mapping[str, Iterable[str]] classified, *, str tool_version, Mapping[str, str]|None pins=None, str|None generated_at=None)
None oct.testing.parallel.write_manifest (Path path, Mapping[str, Any] document)
ParallelManifest oct.testing.parallel.load_manifest (Path path)
tuple[dict[str, str], tuple[str,...]] oct.testing.parallel.resolve_groups (ParallelManifest manifest, Iterable[str] relpaths)
int oct.testing.parallel._raw_max_workers (Path workspace_root, str package)
int oct.testing.parallel.resolve_max_workers (Path workspace_root, str package)
int oct.testing.parallel.available_cpu_count ()
int oct.testing.parallel.resolve_worker_count (Path workspace_root, str package, *, int|None cpu_count=None)
str oct.testing.parallel.free_group_name (str nodeid, *, bool whole_file=False)
tuple[tuple[str,...], str|None] oct.testing.parallel.apply_group_marks (Any config, Iterable[Any] items, Path manifest_path)
bool oct.testing.parallel.is_xdist_worker (Any config)
None oct.testing.parallel._adopt_group_dist_in_worker (Any config, Any option, str dist)
int|None oct.testing.parallel.configure_parallel_defaults (Any config, *, Path workspace_root, str package, str dist="loadgroup")
bool oct.testing.parallel._from_pytest_internals (int depth=4)
bool oct.testing.parallel._is_pid_stamped (str basename, str pid)
None oct.testing.parallel.pytest_addoption (Any parser)
None oct.testing.parallel.pytest_configure (Any config)
None oct.testing.parallel.pytest_runtest_logstart (str nodeid, Any location)
None oct.testing.parallel.pytest_runtest_logfinish (str nodeid, Any location)
None oct.testing.parallel.pytest_sessionfinish (Any session, Any exitstatus)
dict[str, set[str]] oct.testing.parallel.load_traces (Sequence[Path] sources)
tuple[Path, str, tuple[str,...]] oct.testing.parallel._package_for_root (Path root)
Path oct.testing.parallel.default_manifest_path (Path root, Sequence[str] test_roots)
dict[str, str] oct.testing.parallel._parse_pins (Sequence[str] values)
str oct.testing.parallel._tool_version ()
None oct.testing.parallel._print_summary (Mapping[str, Any] document, Path out, Path workspace_root, str package)
list[str] oct.testing.parallel.diff_manifests (Mapping[str, Any] committed, Mapping[str, Any] fresh)
int oct.testing.parallel.run_classify (Sequence[str] argv)
int oct.testing.parallel._run_check (Path out, Mapping[str, Any] document)
int oct.testing.parallel.main (Sequence[str]|None argv=None)

Variables

int oct.testing.parallel.DEFAULT_MAX_WORKERS = 24
str oct.testing.parallel.RES_REGISTRY_SQLITE = "registry_sqlite"
str oct.testing.parallel.RES_COMMS_ROOT = "comms_root"
str oct.testing.parallel.RES_SETTINGS_FILE = "settings_file"
str oct.testing.parallel.RES_OCTRC = "octrc"
str oct.testing.parallel.RES_WORKTREE_DIR = "worktree_dir"
str oct.testing.parallel.RES_MAIN_TREE_WRITE = "main_tree_write"
str oct.testing.parallel.RES_ENV_SUBPROCESS = "env_subprocess"
str oct.testing.parallel.RES_ENV_MUTATION = "env_mutation"
str oct.testing.parallel.RES_NETWORK = "network"
str oct.testing.parallel.RES_CWD_CHANGE = "cwd_change"
str oct.testing.parallel.RES_GLOBAL_SINGLETON_RESET = "global_singleton_reset"
str oct.testing.parallel.PORT_PREFIX = "port:"
str oct.testing.parallel.UNKNOWN_PREFIX = "unknown:"
tuple oct.testing.parallel.RESOURCE_VOCABULARY
frozenset oct.testing.parallel.PROCESS_LOCAL_RESOURCES
str oct.testing.parallel.KEY_SEPARATOR = ":"
frozenset oct.testing.parallel.KEYED_FAMILIES
str oct.testing.parallel.OUTSIDE_KEY = "<outside>"
str oct.testing.parallel.SCHEMA_VERSION = "1.0"
str oct.testing.parallel.MANIFEST_FILENAME = "parallel_manifest.json"
str oct.testing.parallel.GROUP_FREE = "free"
str oct.testing.parallel.GROUP_UNCLASSIFIED = "unclassified-serial"
str oct.testing.parallel.FREE_GROUP_PREFIX = f"{GROUP_FREE}:"
str oct.testing.parallel.WHOLE_FILE_MARKER = "whole_file"
str oct.testing.parallel.PYTHON_ARGV0 = "<python>"
 oct.testing.parallel._PYTHON_PROGRAM = re.compile(r"^python[0-9tw.]*$", re.IGNORECASE)
frozenset oct.testing.parallel._PYTHON_FLAGS
dict oct.testing.parallel.LAUNCH_FAMILIES
frozenset oct.testing.parallel._TMP_SEEDS
frozenset oct.testing.parallel._TMP_CALLS
frozenset oct.testing.parallel._PATH_WRITES
frozenset oct.testing.parallel._OS_WRITES
dict oct.testing.parallel._SHUTIL_WRITES
frozenset oct.testing.parallel._SUBPROCESS_ATTRS
frozenset oct.testing.parallel._SUBPROCESS_MODULES
frozenset oct.testing.parallel._SUBPROCESS_NAMES
frozenset oct.testing.parallel._NETWORK_ATTRS
frozenset oct.testing.parallel._NETWORK_MODULES
frozenset oct.testing.parallel._RESET_NAMES
dict oct.testing.parallel._MODULE_HINTS
frozenset oct.testing.parallel._PATH_CONSTRUCTORS
frozenset oct.testing.parallel._PATH_IDENTITY_CALLS = frozenset({"resolve", "absolute"})
str oct.testing.parallel._PID_PLACEHOLDER = "0"
int oct.testing.parallel._MAX_PARENTS_INDEX = 64
str oct.testing.parallel.TRACE_OPTION = "--oct-trace"
tuple oct.testing.parallel._TRACE_IGNORED
int oct.testing.parallel.EXIT_MANIFEST_DRIFT = 4