summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()