PopenPlugin¶
PopenPlugin
¶
Bases: StateMachinePlugin
Popen interception plugin.
Replaces subprocess.Popen with _FakePopen at activate() time and restores the original at deactivate() time. Uses reference counting so nested sandboxes work correctly.
States: created -> running -> terminated
Coexists with SubprocessPlugin: SubprocessPlugin patches subprocess.run and shutil.which; PopenPlugin patches subprocess.Popen. Both plugins target independent names in the subprocess module and restore correctly.
Source code in src/bigfoot/plugins/popen_plugin.py
activate
¶
Reference-counted class-level patch installation.
Source code in src/bigfoot/plugins/popen_plugin.py
matches
¶
Field-by-field comparison with dirty-equals support.
Source code in src/bigfoot/plugins/popen_plugin.py
assertable_fields
¶
Return assertable fields for each step type.