summaryrefslogtreecommitdiff
path: root/pytest.py
diff options
context:
space:
mode:
authorStephanie Marcu <stephanie.marcu@logilab.fr>2008-05-23 14:14:15 +0200
committerStephanie Marcu <stephanie.marcu@logilab.fr>2008-05-23 14:14:15 +0200
commitc2b9b7c5652a88072fbaf509d846a80fd92d3a7b (patch)
tree1f8fd1041ffbe7926956ff83dc17b3a663ac0a33 /pytest.py
parentd276c80ba44f32e19d098ec0d51db9949396d2af (diff)
downloadlogilab-common-c2b9b7c5652a88072fbaf509d846a80fd92d3a7b.tar.gz
cleaning a bit pytest.py
Diffstat (limited to 'pytest.py')
-rw-r--r--pytest.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/pytest.py b/pytest.py
index 8806ca0..d7382b9 100644
--- a/pytest.py
+++ b/pytest.py
@@ -284,7 +284,6 @@ class PyTester(object):
"""encaspulates testrun logic"""
def __init__(self, cvg, options):
- self.tested_files = []
self.report = GlobalTestReport()
self.cvg = cvg
self.options = options
@@ -336,9 +335,9 @@ class PyTester(object):
os.chdir(dirname)
modname = osp.basename(filename)[:-3]
try:
- print >>sys.stderr, (' %s ' % osp.basename(filename)).center(70, '=')
+ print >> sys.stderr, (' %s ' % osp.basename(filename)).center(70, '=')
except TypeError: # < py 2.4 bw compat
- print >>sys.stderr, (' %s ' % osp.basename(filename)).center(70)
+ print >> sys.stderr, (' %s ' % osp.basename(filename)).center(70)
try:
try:
tstart, cstart = time(), clock()
@@ -350,7 +349,7 @@ class PyTester(object):
return testprog
except (KeyboardInterrupt, SystemExit):
raise
- except Exception, exc:
+ except Exception:
self.report.failed_to_test_module(filename)
print 'unhandled exception occured while testing', modname
import traceback
@@ -407,7 +406,7 @@ class DjangoTester(PyTester):
"""walks trhough current working directory, finds something
which can be considered as a testdir and runs every test there
"""
- for dirname, dirs, files in os.walk(os.getcwd()):
+ for dirname, dirs, _ in os.walk(os.getcwd()):
for skipped in ('CVS', '.svn', '.hg'):
if skipped in dirs:
dirs.remove(skipped)
@@ -616,7 +615,7 @@ def run():
prof.close()
print 'profile data saved in', options.profile
else:
- cmd(*args)
+ cmd(*args)
except SystemExit:
raise
except: