test/run_trial.py: protect run() with __name__

Without this, any import (e.g. when running "automat-visualize") caused the
tests to be run as a side-effect.
This commit is contained in:
Brian Warner 2017-02-22 18:03:33 -08:00
parent 6889ba088c
commit 71f34e4f5b

View File

@ -11,6 +11,6 @@ from __future__ import unicode_literals
# So use:
# "coverage run -m wormhole.test.run_trial ARGS"
from twisted.scripts.trial import run
run()
if __name__ == "__main__":
from twisted.scripts.trial import run
run()