mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-09-17 16:57:56 -07:00
TESTS TESTS ADDED MORE TEST TESTED GRESOURCES TESTS TESTS I LOVE TESTS SO MUCH
- Fully covered gresource orchestrator and it helpers with tests - Use abstract command runner INSTEAD OF SUBPROCESS in gresources - Replaced some subprocesses by builtin functions
This commit is contained in:
0
scripts/utils/command_runner/__init__.py
Normal file
0
scripts/utils/command_runner/__init__.py
Normal file
14
scripts/utils/command_runner/command_runner.py
Normal file
14
scripts/utils/command_runner/command_runner.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import subprocess
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class CommandRunner(ABC):
|
||||
@abstractmethod
|
||||
def run(self, command: list[str], **kwargs) -> subprocess.CompletedProcess:
|
||||
"""
|
||||
Run a command in the shell and return the output.
|
||||
:param command: Command to run.
|
||||
:param kwargs: Additional arguments for the command.
|
||||
:return: Output of the command.
|
||||
"""
|
||||
pass
|
@@ -0,0 +1,8 @@
|
||||
import subprocess
|
||||
|
||||
from scripts.utils.command_runner.command_runner import CommandRunner
|
||||
|
||||
|
||||
class SubprocessCommandRunner(CommandRunner):
|
||||
def run(self, command: list[str], **kwargs) -> subprocess.CompletedProcess:
|
||||
return subprocess.run(command, **kwargs)
|
Reference in New Issue
Block a user