summaryrefslogtreecommitdiff
path: root/testutils.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-19 17:36:47 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-19 17:36:47 +0200
commitd4d8fe742e8860df3a699a4999be133a1fc8db42 (patch)
tree0d616ccb2d84a926c1dba1f67c4181a3956cd27f /testutils.py
parentfcc1a91b50f564627716230ffc159381b241c07f (diff)
downloadpylint-d4d8fe742e8860df3a699a4999be133a1fc8db42.tar.gz
lint fixes
Diffstat (limited to 'testutils.py')
-rw-r--r--testutils.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/testutils.py b/testutils.py
index c61c2e4..bd9d4cb 100644
--- a/testutils.py
+++ b/testutils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2003-2008 LOGILAB S.A. (Paris, FRANCE).
+# Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
@@ -15,22 +15,20 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""functional/non regression tests for pylint"""
-import unittest
import sys
import re
from glob import glob
from os import linesep
-from os.path import exists, abspath, dirname, join, basename, splitext
+from os.path import abspath, dirname, join, basename, splitext
from cStringIO import StringIO
from logilab.common import testlib
-from logilab.astng import MANAGER
+from pylint import checkers
from pylint.reporters import BaseReporter
from pylint.interfaces import IReporter
from pylint.lint import PyLinter
-from pylint import checkers
# Utils
@@ -78,9 +76,9 @@ def get_tests_info(input_dir, msg_dir, prefix, suffix):
result.append((infile, outfile))
return result
+
class TestReporter(BaseReporter):
- """ store plain text messages
- """
+ """reporter storing plain text messages"""
__implements____ = IReporter
@@ -104,7 +102,7 @@ class TestReporter(BaseReporter):
def finalize(self):
self.messages.sort()
for msg in self.messages:
- print >>self.out, msg
+ print >> self.out, msg
result = self.out.getvalue()
self.reset()
return result
@@ -138,12 +136,13 @@ def exception_str(self, ex):
# Test classes
class LintTestUsingModule(testlib.TestCase):
+ INPUT_DIR = None
DEFAULT_PACKAGE = 'input'
package = DEFAULT_PACKAGE
linter = linter
module = None
depends = None
-
+ output = None
_TEST_TYPE = 'module'
def shortDescription(self):