From: Zooko O'Whielacronx Date: Sat, 27 Jan 2007 03:17:59 +0000 (-0700) Subject: pyfec: execute tests on import of test_pyfec.py only if it is the __main__ X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~302 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/frontends/using.html?a=commitdiff_plain;h=1f1b2a03b74f5d70fce972420796621dad8b74e9;p=tahoe-lafs%2Ftahoe-lafs.git pyfec: execute tests on import of test_pyfec.py only if it is the __main__ --- diff --git a/pyfec/fec/test/test_pyfec.py b/pyfec/fec/test/test_pyfec.py index b01a3e64..00f59fba 100644 --- a/pyfec/fec/test/test_pyfec.py +++ b/pyfec/fec/test/test_pyfec.py @@ -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()