summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-12 12:32:12 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-12 12:32:12 -0400
commitc6933d0d26c8fb26fd26d6b4cf93204cdbb7ef3e (patch)
treea245531abd8adc1e909bf2bf64dabaada2543f7c
parent6930a02e97673fd4c4681a8e37e6a8b1f747415c (diff)
downloadpython-coveragepy-git-c6933d0d26c8fb26fd26d6b4cf93204cdbb7ef3e.tar.gz
Some light clean up of test_farm.py due to pylint.
-rw-r--r--Makefile1
-rw-r--r--test/test_farm.py11
2 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2c1ed49d..77b7d607 100644
--- a/Makefile
+++ b/Makefile
@@ -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()