]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
pyfec: execute tests on import of test_pyfec.py only if it is the __main__
authorZooko O'Whielacronx <zooko@zooko.com>
Sat, 27 Jan 2007 03:17:59 +0000 (20:17 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sat, 27 Jan 2007 03:17:59 +0000 (20:17 -0700)
pyfec/fec/test/test_pyfec.py

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