You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to provide tests for sections of code that rely on __name__ == "__main__". Currently, this is ignored by the tests and coverage, but it would be desirable to test this anyway. This should be possible using imp.load_source from the builtin module imp. Notable mention to other strategies from StackOverflow ( http://stackoverflow.com/questions/5850268/how-to-test-or-mock-if-name-main-contents ).
The text was updated successfully, but these errors were encountered:
These sections have been eliminated from the modules. There are some stubs created in the bin directory that are not tested. However, such an involved solution is not required for them.
Simply running --help should be sufficient to make sure they exist and are running roughly correctly. As all of them call a main function that is heavily tested, there is nothing else that needs to be done. This is considered a different issue and has been placed here ( #245 ).
It would be nice to provide tests for sections of code that rely on
__name__ == "__main__"
. Currently, this is ignored by the tests and coverage, but it would be desirable to test this anyway. This should be possible usingimp.load_source
from the builtin moduleimp
. Notable mention to other strategies from StackOverflow ( http://stackoverflow.com/questions/5850268/how-to-test-or-mock-if-name-main-contents ).The text was updated successfully, but these errors were encountered: