pyfec: execute tests on import of test_pyfec.py only if it is the __main__

This commit is contained in:
Zooko O'Whielacronx 2007-01-26 20:17:59 -07:00
parent 9a39ec9f4e
commit 1f1b2a03b7

View File

@ -83,5 +83,7 @@ def test_random():
_test_random() _test_random()
# sys.stdout.write(".") # sys.stdout.write(".")
print "%d randomized tests pass." % (i+1) print "%d randomized tests pass." % (i+1)
if __name__ == "__init__":
test_random() test_random()