# Practicum 2 Tests - Problem 1

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": ["2"],
        "expected_output": """ 1
 2
 4
 8
16"""
    },
    {
        "args": ["5"],
        "expected_output": """  1
  5
 25
125
625"""
    },
    {
        "args": ["9"],
        "expected_output": """   1
   9
  81
 729
6561"""
    },
    {
        "args": ["8"],
        "expected_output": """   1
   8
  64
 512
4096"""
    }
]

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