Created
December 1, 2017 20:58
-
-
Save dragon0/5c520485d24ff4e605e8b250ca1e144e to your computer and use it in GitHub Desktop.
Python: execute doctests before running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
pass | |
if __name__ == '__main__': | |
import doctest | |
failure_count, test_count = doctest.testmod() | |
if failure_count == 0: | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment