diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-12 12:32:12 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-12 12:32:12 -0400 |
commit | c6933d0d26c8fb26fd26d6b4cf93204cdbb7ef3e (patch) | |
tree | a245531abd8adc1e909bf2bf64dabaada2543f7c | |
parent | 6930a02e97673fd4c4681a8e37e6a8b1f747415c (diff) | |
download | python-coveragepy-git-c6933d0d26c8fb26fd26d6b4cf93204cdbb7ef3e.tar.gz |
Some light clean up of test_farm.py due to pylint.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | test/test_farm.py | 11 |
2 files changed, 7 insertions, 5 deletions
@@ -22,6 +22,7 @@ clean: lint: clean python -x /Python25/Scripts/pylint.bat --rcfile=.pylintrc coverage + python -x /Python25/Scripts/pylint.bat --rcfile=.pylintrc test/test_farm.py python /Python25/Lib/tabnanny.py coverage python checkeol.py diff --git a/test/test_farm.py b/test/test_farm.py index 9c91e306..88f7d878 100644 --- a/test/test_farm.py +++ b/test/test_farm.py @@ -1,7 +1,6 @@ """Run tests in the farm subdirectory. Designed for nose.""" import filecmp, fnmatch, glob, os, shutil, sys -from coverage.files import FileLocator try: import subprocess @@ -122,7 +121,7 @@ class FarmTestCase(object): retcode = proc.wait() output = proc.stdout.read() else: - stdin, stdouterr = os.popen4(cmd) + _, stdouterr = os.popen4(cmd) output = stdouterr.read() retcode = 0 # Can't tell if the process failed. print output, @@ -168,9 +167,7 @@ class FarmTestCase(object): if os.path.exists(cleandir): shutil.rmtree(cleandir) - -# So that we can run just one farm run.py at a time. -if __name__ == '__main__': +def main(): op = sys.argv[1] if op == 'run': # Run the test for real. @@ -186,3 +183,7 @@ if __name__ == '__main__': test[0](*test[1:]) else: print "Need an operation: run, out, clean" + +# So that we can run just one farm run.py at a time. +if __name__ == '__main__': + main() |