We can increase code coverage (in our exercises) by importing the __main__ module in a CLI test.
The code that is guarded from being executed during an import (by if __name__ == '__main__':) is not executed this way. To also execute that remains an exercise to the reader, for future iterations.
We can increase code coverage (in our exercises) by importing the
__main__
module in a CLI test.The code that is guarded from being executed during an import (by
if __name__ == '__main__':
) is not executed this way. To also execute that remains an exercise to the reader, for future iterations.