+ """
+ # Running the test suite clobbers it! And deepcopy() doesn't work
+ # on a suite that contains doctests! ARRRGRRGRRGRHG!!!!!! You're all
+ # idiots.
+ result = run_suite(build_suite(doctests))
+
+ if result.wasSuccessful() and not loop:
+ return 0
+
+ if loop:
+ passed = 0
+ while result.wasSuccessful():
+ print('Passed: {:d}'.format(passed))
+ passed += 1
+ result = run_suite(build_suite(doctests))
+
+ return 1
+
+
+if __name__ == '__main__':
+ exit(main(not "--no-doctests" in argv, '--loop' in argv))