Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How To test Without Really Trying
def hard_state_add_5(whole_obj):
if "a" in whole_obj:
return whole_obj["a"] + 5
def easy_state_add_5(input_num):
return input_num + 5
def main():
whole_obj = {}
whole_obj["a"] = 10
val1 = hard_state_add_5(whole_obj)
val2 = easy_state_add_5(whole_obj["a"])
print(val1) # 15
print(val2) # 15
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.