diff options
author | Vincent Driessen <vincent@datafox.nl> | 2010-07-27 10:16:08 +0200 |
---|---|---|
committer | Vincent Driessen <vincent@datafox.nl> | 2010-07-27 10:16:08 +0200 |
commit | 3cc6c610bdd0b5a630215d691dd50a7fc7e9e017 (patch) | |
tree | b5432e43ec64b2f07b7493144376780e7024431d | |
parent | f50a593a3bfbb08e21838adba5f82edd6e8cffab (diff) | |
download | nose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.tar.bz2 nose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.tar.xz nose-machineout-3cc6c610bdd0b5a630215d691dd50a7fc7e9e017.zip |
PEP8ify more and removed unused "import re".
-rw-r--r-- | machineout.py | 5 |
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. | |||
3 | It is intended to be use to integrate nose with your IDE such as Vim. | 3 | It is intended to be use to integrate nose with your IDE such as Vim. |
4 | """ | 4 | """ |
5 | 5 | ||
6 | import re | ||
7 | import os | 6 | import os |
8 | import traceback | 7 | import traceback |
9 | from nose.plugins import Plugin | 8 | from 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 |