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 | c6ffb97a152efe2b14f28ee94dc948d3eaf5a06d (patch) | |
tree | bae9a38db95593c4a95848c3d973d9b94aeeed3d | |
parent | 8873519fdbeb3a78bd908be2fb0b7458f5b69247 (diff) | |
download | python-coveragepy-c6ffb97a152efe2b14f28ee94dc948d3eaf5a06d.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 9c91e30..88f7d87 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() |