I'm reading Python's documentation about unit tests and just noticed the -m
flag when running test cases:
There are two SO questions about the purpose of the -m
flag, so I know it runs modules as scripts and also there's a full explanation here about why it is needed.
My question is specific to unit tests: why do they need to run as scripts?
The documentation just throws -m
in all examples, but I could not find the rationale behind it.