summaryrefslogtreecommitdiff
path: root/test/test_func.py
diff options
context:
space:
mode:
authorPierre-Yves David <pierre-yves.david@logilab.fr>2009-11-25 16:30:28 +0100
committerPierre-Yves David <pierre-yves.david@logilab.fr>2009-11-25 16:30:28 +0100
commit00a921add4584115fd77065edc94735a08ea85a3 (patch)
tree532a8f5b4fc870bc814fc7d21f11f67cb4a71bf8 /test/test_func.py
parent4a6140467dbc6e88a10884476f39eaa8218edfef (diff)
downloadpylint-00a921add4584115fd77065edc94735a08ea85a3.tar.gz
add description au tags to suite generated in test_func.py
Diffstat (limited to 'test/test_func.py')
-rw-r--r--test/test_func.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/test_func.py b/test/test_func.py
index e614d5c..1d0494d 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -57,10 +57,29 @@ def exception_str(ex):
return 'in %s\n:: %s' % (ex.file, ', '.join(ex.args))
class LintTestUsingModule(testlib.TestCase):
- package = 'input'
+ DEFAULT_PACKAGE = 'input'
+ package = DEFAULT_PACKAGE
linter = linter
+ module = None
+ depends = None
+
+ _TEST_TYPE = 'module'
+
+ def shortDescription(self):
+ values = { 'mode' : self._TEST_TYPE,
+ 'input': self.module,
+ 'pkg': self.package,
+ 'cls': self.__class__.__name__}
+
+ if self.package == self.DEFAULT_PACKAGE:
+ msg = '%(mode)s test of input file "%(input)s" (%(cls)s)'
+ else:
+ msg = '%(mode)s test of input file "%(input)s" in "%(pkg)s" (%(cls)s)'
+ return msg % values
+
def setUp(self):
MANAGER.set_cache_size(200) # reset cache
+
def test_functionality(self):
tocheck = [self.package+'.'+self.module]
if self.depends:
@@ -98,6 +117,8 @@ class LintTestUsingModule(testlib.TestCase):
class LintTestUsingFile(LintTestUsingModule):
+ _TEST_TYPE = 'file'
+
def test_functionality(self):
tocheck = [self.package+'/' + self.module + '.py']
if self.depends:
@@ -168,6 +189,7 @@ def make_tests(filter_rgx):
module = module_file.replace('.py', '')
output = messages_file
depends = dependencies or None
+ tags = testlib.Tags(('generated',))
tests.append(LintTestUsingModuleTC)
if MODULES_ONLY:
@@ -177,6 +199,7 @@ def make_tests(filter_rgx):
module = module_file.replace('.py', '')
output = exists(messages_file + '2') and (messages_file + '2') or messages_file
depends = dependencies or None
+ tags = testlib.Tags(('generated',))
tests.append(LintTestUsingFileTC)
## # special test for f0003