import unittest
import subprocess
def execute_command(command):
"""Execute a shell command and return its printed value."""
return subprocess.run(command, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()
class TestTemplate(unittest.TestCase):
def test_case1(self):
result = 1
expected_result = 1
self.assertEqual(result, expected_result)
if __name__ == '__main__':
unittest.main(verbosity=2)

Hubert's Coding Notes
Useful notes for CS people