Skip to content

Instantly share code, notes, and snippets.

View ahojukka5's full-sized avatar

Jukka Aho ahojukka5

View GitHub Profile
@GenevieveBuckley
GenevieveBuckley / test_monkeypatch.py
Last active December 12, 2023 18:57
Monkeypatching user input with pytest
from io import StringIO
def double():
x = input("Enter an integer: ")
return int(x) * 2
def adding():
x = float(input('Enter the first number'))