Making the test run, when the script is run

,

Without unitest.main(), the tests wouldn’t run.

Please consider explaining to the student why the if statement is necessary, and why it checks if the name is __main__.
9 years ago I didn’t understand this, I just found out about modules, and I’m very excited to share this.

Thank you. :grapes:

unitest.main() is not needed if you’re running pytest.

1 Like

Thank you so much. I were doing what I used to do on exercism 9 years ago. :sweat_smile:
pytest is awesome. It’s like riding a spaceship.

Should I close this? Does checking your response as the Solution automatically close this? Should I do anything else?

Thank you.

Selecting a response as a solution marks the topic as solved. Nothing further is needed. Thanks for checking!

1 Like