if __name__ == "__main__":
Also written: __name__, __main__
A Python idiom that runs code only when the file is run directly, not when another file imports it. It lets tests import your functions without printing the report.
Also written: __name__, __main__
A Python idiom that runs code only when the file is run directly, not when another file imports it. It lets tests import your functions without printing the report.