summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Driessen <vincent@datafox.nl>2010-07-27 10:16:08 +0200
committerVincent Driessen <vincent@datafox.nl>2010-07-27 10:16:08 +0200
commit3cc6c610bdd0b5a630215d691dd50a7fc7e9e017 (patch)
treeb5432e43ec64b2f07b7493144376780e7024431d
parentf50a593a3bfbb08e21838adba5f82edd6e8cffab (diff)
downloadnose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.tar.bz2
nose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.tar.xz
nose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.zip
PEP8ify more and removed unused "import re".
-rw-r--r--machineout.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/machineout.py b/machineout.py
index 4a29c53..9ba75be 100644
--- a/machineout.py
+++ b/machineout.py
@@ -3,7 +3,6 @@ Formats nose output into format easily parsable by machine.
3It is intended to be use to integrate nose with your IDE such as Vim. 3It is intended to be use to integrate nose with your IDE such as Vim.
4""" 4"""
5 5
6import re
7import os 6import os
8import traceback 7import traceback
9from nose.plugins import Plugin 8from nose.plugins import Plugin
@@ -71,12 +70,12 @@ class NoseMachineReadableOutput(Plugin):
71 self.stream.writeln("%s: %s: %s" % (prefix, etype, msg)) 70 self.stream.writeln("%s: %s: %s" % (prefix, etype, msg))
72 71
73 if len(lines) > 1: 72 if len(lines) > 1:
74 pad = ' '*(len(etype)+1) 73 pad = ' ' * (len(etype) + 1)
75 for line in lines[1:]: 74 for line in lines[1:]:
76 self.stream.writeln("%s: %s %s" % (prefix, pad, line)) 75 self.stream.writeln("%s: %s %s" % (prefix, pad, line))
77 76
78 def _format_testfname(self, fname): 77 def _format_testfname(self, fname):
79 if fname.startswith(self.basepath): 78 if fname.startswith(self.basepath):
80 return fname[len(self.basepath)+1:] 79 return fname[len(self.basepath) + 1:]
81 80
82 return fname 81 return fname