Skip to content

Instantly share code, notes, and snippets.

@wingyplus
wingyplus / test_subprocess.py
Last active October 15, 2022 06:24
mocking subprocess
import unittest
import mock
import subprocess
class PythonSubprocessTest(unittest.TestCase):
class MockPopen(object):
def __init__(self):
pass
def communicate(self, input=None):
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 26, 2024 08:00
set -e, -u, -o, -x pipefail explanation