Let's say I have a function that prints an integer read from the console:
in submission.py:
def print_input():
n = int(input())
print(n)
How can I patch the input and output to test this function on an array of test cases?
(Obviously, I would like the mock methods for input/output to behave exactly like input() and print() in python.