import pytest
import subprocess

from do_math import (
    add,
    subtract,
    multiply
)

def test_add():
    assert add(2,3) == 5

def test_subtract():
    assert subtract(5,2) == 3

def test_multiply():
    assert multiply(2,4) == 8


# def test_mainguard(capsys):
#     command = ["python", "-c", "import do_math"]
#     message = "importing do_math should not print any output or cause an error; check your main guard"
#     try:
#         assert subprocess.check_output(command, text=True) == "", message
#     except subprocess.CalledProcessError:
#         assert False, message
# 
# def test_mainprogram():
#     command = ["python", "do_math.py"]
#     output = subprocess.check_output(command, text=True).rstrip("\n")
#     assert output == "addition"

pytest.main(["do_math_Test.py", "-p", "no:faulthandler", "-v"])


