# Practicum 2 Tests - Problem 2

try:
    from iotest import run_assignment_tests
except ImportError:
    print("❌ Error: Could not find the 'iotest' module.")
    print("Please make sure 'iotest.py' is in the same directory as this test file and your solution program.")
    print("'iotest.py' was included with the practicum zip file.")
    exit(1)

test_cases = [
    {
        "args": ["9", "2"],
        "expected_output": "What is 9 * 2?\nYour answer is False\n",
        "stdin": ["10"],
    },
    {
        "args": ["9", "2"],
        "expected_output": "What is 9 * 2?\nYour answer is True\n",
        "stdin": ["18"],
    },
    {
        "args": ["6", "4"],
        "expected_output": "What is 6 * 4?\nYour answer is True\n",
        "stdin": ["24"],
    },
    {
        "args": ["3", "-2"],
        "expected_output": "What is 3 * -2?\nYour answer is True\n",
        "stdin": ["-6"],
    },
    {
        "args": ["-4", "-5"],
        "expected_output": "What is -4 * -5?\nYour answer is False\n",
        "stdin": ["-20"],
    },
]

if __name__ == "__main__":
    run_assignment_tests("p2.py", test_cases)

