From 1f1b2a03b74f5d70fce972420796621dad8b74e9 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Fri, 26 Jan 2007 20:17:59 -0700 Subject: [PATCH] pyfec: execute tests on import of test_pyfec.py only if it is the __main__ --- pyfec/fec/test/test_pyfec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() -- 2.45.2