REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.98 KB
Close
/opt/cloudlinux/venv/lib/python3.11/site-packages/pytest_subprocess/process_recorder.py
Text
Base64
from typing import Iterator from typing import List from typing import Optional from typing import TYPE_CHECKING from typing import Union from .types import COMMAND from .utils import Command if TYPE_CHECKING: from .fake_popen import FakePopen, AsyncFakePopen class ProcessRecorder: """ Recorder class that holds all FakePopen (or AsyncFakePopen) instances that were created by the subprocess. The class contains auxiliary """ calls: List[Union["FakePopen", "AsyncFakePopen"]] def __init__(self) -> None: self.calls = [] @property def first_call(self) -> Optional[Union["FakePopen", "AsyncFakePopen"]]: """Get the first process call""" if not self.calls: return None return self.calls[0] @property def last_call(self) -> Optional[Union["FakePopen", "AsyncFakePopen"]]: """Get the last (latest) process call""" if not self.calls: return None return self.calls[-1] def call_count(self, command: Optional[COMMAND] = None) -> int: """Get process call count - optionally match with arguments""" if not command: return len(self.calls) return len(tuple(self.get_matching_calls(command))) def was_called(self, command: Optional[COMMAND] = None) -> bool: """Check if process was called - optionally match with arguments""" if not self.calls: return False if not command: return True return any(self.get_matching_calls(command)) def get_matching_calls( self, command: COMMAND ) -> Iterator[Union["FakePopen", "AsyncFakePopen"]]: """Get calls that match arguments""" if not isinstance(command, Command): command = Command(command) return (call for call in self.calls if self.calls if command == call.args) def clear(self) -> None: """Clear records""" self.calls.clear()
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
asyncio_subprocess.py
279 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
exceptions.py
442 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fake_popen.py
15.45 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fake_process.py
5.38 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fixtures.py
262 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
process_dispatcher.py
8.85 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
process_recorder.py
1.98 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
py.typed
0 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.py
488 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.py
5.28 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
226 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).